Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 docker installation tutorial

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report