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 -yInstalling OpenJDK
sudo dnf install java-1.8.0-openjdk-devel
sudo dnf install java-11-openjdk-develInstalling Git
sudo dnf install gitvim ~/.ssh/configand paste and save the following content:
Host github.com Hostname ssh.github.com Port 443chmod 600 ~/.ssh/config
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:
using nmtui:
Usingip link set
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:
ss | head -1 1.ss -l | grep LISTEN | grep tcptelnet localhost 2181check
docker logs -f containerAto watch the connection happeningIf the connection can happen from the hosting operation system, and not from container B, then it try to temporary disable the
firewalldto verify if this fixes the issue.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
mkdir /opt/ideaDownload and unzip Intellij in
/opt/idea/sh /opt/idea/idea-IU-183.6156.11/bin/idea.shfollow the installation steps
Installing NodeJS
Other Links
https://serverspace.io/support/help/how-to-install-docker-on-centos-8/
Last updated
Was this helpful?