Centos7 docker installation tutorial
This article teaches you how to install docker in CentOS 7 and above. The first step is to confirm that it is the second step of centos7 and above cat / etc/redhat-releaseCentOS Linux release 7.4.1708 (Core). After yum installs gcc, it is determined that centos7 can be installed on the public network yum-y install gccyum-y install gcc-c++. Check the gcc version gcc-vUsing built-in specs.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapperTarget: x86_64-redhat-linuxConfigured with:.. / configure-- prefix=/usr-- mandir=/usr/share/man-- infodir=/usr/share/info-- with-bugurl= http://bugzilla.redhat.com/bugzilla-- enable-bootstrap-- enable-shared-- enable-threads=posix-- enable-checking=release-- with -system-zlib-enable-__cxa_atexit-disable-libunwind-exceptions-enable-gnu-unique-object-enable-linker-build-id-with-linker-hash-style=gnu-enable-languages=c OBJC, objlic, caterpillar, java, fortran, ADA, go. Lto-enable-plugin-enable-initfini-array-disable-libgcj-with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install-with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install-enable-gnu-indirect-function-with-tune=generic-with-arch_32=x86 64-build=x86_64-redhat-linuxThread Model: posixgcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) step 3 Uninstall the old version of sudo yum remove docker\ docker-client\ docker-client-latest\ docker-common\ docker-latest\ docker-latest-logrotate\ docker-logrotate\ docker-engine
\ is a connector
The fourth step Install the required software package sudo yum install-y yum-utils\ device-mapper-persistent-data\ lvm2 step 5 set up stable Image Library # official recommendation sudo yum-config-manager\-- add-repo\ https://download.docker.com/linux/centos/docker-ce.repo# actual recommendation sudo yum yum-config-manager-- add-repo http://mirrors.aliyun.com/cloer-re/linux/centos/docker-re.repo step 6 update yum Package Index yum makecache fast step 7 install docker ce# official website sudo yum-y install docker-ce docker-ce-cli containerd.io# Silicon Valley yum-y install docker-ce step 8 launch dockersudo systemctl start docker step 9 Test docker versiondocer run hello-world step 10 configure Image acceleration sudo mkdir-p / etc/dockersudo tee / etc/docker/daemon.json# daemon.json content {"registry-mirrors": ["https://eu2u8bif.mirror.aliyuncs" .com "]} # Reload daemon.jsonsudo systemctl daemon-reload# restart dockersudo systemctl restart docker step 11 unload # stop dockersystemctl stop docker# remove dockersudo yum-y remove docker-ce# remove all containers / mirrors / data volumes sudo rm-rf / var/lib/docker
Original address: https://www.linuxprobe.com/centos7-docker.html