Setup CentOS 8 and Docker

Collection of commands required to setup CentOS development environment

Installing Ntfs Support

Command to enable NTFS/FAT32 file systems support:

sudo dnf install epel-release -y
sudo dnf install ntfs-3g -y

Installing OpenJDK

sudo dnf install java-1.8.0-openjdk-devel
sudo dnf install java-11-openjdk-devel

Installing Git

Installing Docker CE

By default podman-docker is installed. and this will cause the following error:

package docker-ce-cli-1:19.03.5-3.el7.x86_64 conflicts with docker provided by podman-docker-1.0.5-1.gitf604175.module_el8.0.0+194+ac560166.noarch

To avoid this issue run the following commands:

Test Docker CE

Installing Docker Compose

Troubleshooting

408 Request Time-out while signing in or pulling an image

This issue was caused by the fact that the MTU on both the ethernet and wifi connection was set to AUTO. The issue can be fixed changing the MTU to 900 using one of the following options:

For each network interface managed by the NetworkManager daemon, a configuration file is created inside the /etc/sysconfig/network-scripts directory. The name of the file is composed by the ifcfg- prefix plus the name of the interface.

We can manually change the NIC configuration files:

By running the ip addr command again we can verify the IP has changed:

Container B has not access to Container A and log file error is:

NO ROUTE TO HOST network request from container to...

This was firewall issue in the OS hosting docker. To troubleshoot the issue: 1) Check if the port from container A is accessible from the localhost:

  1. ss | head -1 1.ss -l | grep LISTEN | grep tcp

  2. telnet localhost 2181

  3. check docker logs -f containerA to watch the connection happening

  4. If the connection can happen from the hosting operation system, and not from container B, then it try to temporary disable the firewalld to verify if this fixes the issue.

  5. Add appropriate firewall configuration

Further information on Docker networking time issue can be found here:

Installing Gradle

paste the following lines:

export GRADLE_HOME=/opt/gradle/gradle-5.1

export PATH=${GRADLE_HOME}/bin:${PATH}

Installing Kubernetes

https://www.techrepublic.com/article/how-to-install-kubernetes-on-centos-8/ https://www.youtube.com/watch?v=Araf8JYQn3w&list=PL34sAs7_26wNBRWM6BDhnonoA5FMERax0&index=3&t=0s

Installing Intellij

  1. mkdir /opt/idea

  2. Download and unzip Intellij in /opt/idea/

  3. sh /opt/idea/idea-IU-183.6156.11/bin/idea.sh

  4. follow the installation steps

Installing NodeJS

https://serverspace.io/support/help/how-to-install-docker-on-centos-8/

Last updated

Was this helpful?