Docker基本介绍
DogJay
2019-07-25
【中间件技术】
5174人已围观
- 主要有两个版本:
Docker Enterprise Edition (Docker EE) is designed for enterprise development and IT teams who build, ship, and run business critical applications in production at scale. Docker EE is integrated, certified, and supported to provide enterprises with the most secure container platform in the industry to modernize all applications. For more information about Docker EE, including purchasing options, see Docker Enterprise Edition. Docker Community Edition (Docker CE) is ideal for developers and small teams looking to get started with Docker and experimenting with container-based apps. Docker CE is available on many platforms, from desktop to cloud to server. Docker CE is available for macOS and Windows and provides a native experience to help you focus on learning Docker. You can build and share containers and automate the development pipeline all from a single environment. Docker CE has both stable and edge channels. Stable builds are released once per quarter and are supported for 4 months. Edge builds are released once per month, and are supported for that month only. If you subscribe to the Edge channel on Linux distributions, you should also subscribe to the Stable channel.
官网总的安装手册:https://docs.docker.com/engine/installation/#docker-editions
官网 CentOS 安装手册:https://docs.docker.com/engine/installation/linux/centos/
我这里选择 Docker CE 版本:
sudo yum makecache fast
sudo yum install -y docker-ce
,大小:19M,速度很慢。
启动 Docker:
systemctl start docker.service
停止 Docker:
systemctl stop docker.service
运行 hello world 镜像:
sudo docker run hello-world
- 因为是第一次使用,所以没这个镜像,需要一个下载过程,所以需要几分钟,可能还会报:Timeout。
- 镜像自动下载好后会输出这样一段内容,表示已经正常安装并可用了:
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 78445dd45222: Pull completeDigest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7 Status: Downloaded newer image for hello-world:latest Hello from Docker!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. 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 bash Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
吐槽(0)
上一篇:常用云计算单词中英对照