In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install docker and docker-compose, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Want to quickly install docker and docker-compose? Then follow this article with a copy and paste to complete the installation:
Environmental information
Operating system: CentOS Linux release 7.7.1908 (Core
Operating account: root
Docker version: current latest version: 19.03.2
Docker-compose version: current latest version: 1.24.1
Installation
Execute the following command (if it is not a root account, please add sudo yourself):
Yum install-y yum-utils device-mapper-persistent-data lvm2\ & & yum-config-manager\-- add-repo\ https://download.docker.com/linux/centos/docker-ce.repo\ & & yum install-y docker-ce docker-ce-cli containerd.io\ & & systemctl start docker\ & & yum- y install epel-release\ & & yum- y install python-pip\ & & pip install-- upgrade pip\ & & pip install docker-compose
Wait a few minutes to complete the installation of docker and docker-compose
Verification
Docker version:
[root@centos7] # docker versionClient: Docker Engine-Community Version: 19.03.2 API version: 1.40 Go version: go1.12.8 Git commit: 6a30dfc Built: Thu Aug 29 05:28:55 2019 OS/Arch: linux/amd64 Experimental: falseServer: Docker Engine-Community Engine: Version: 19.03.2 API version: 1.40 ( Minimum version 1.12) Go version: go1.12.8 Git commit: 6a30dfc Built: Thu Aug 29 05:27:34 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.6 GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc: Version: 1.0.0-rc8 GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f docker-init: Version: 0.18.0 GitCommit: fec3683
Docker-compose version:
[root@centos7 ~] # docker-compose versiondocker-compose version 1.24.1, build 4667896docker-py version: 3.7.3CPython version: 2.7.5OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
Run hello world:
[root@centos7 ~] # docker run-- rm hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world1b930d010525: Pull complete Digest: sha256:b8ba256769a0ac28dd126d584e0a2011cd2877f3f76e093a7ae560f2a5301c00Status: Downloaded newer image for hello-world:latestHello from docking this message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $docker run-it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://hub.docker.com/For more examples and ideas, visit: https://docs.docker.com/get-started/ are all the contents of this article "how to install docker and docker-compose". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.