CentOS7.9下安装完成docker后,我们开始部署第一个docker image-hello world
1.以root用户登录CentOS7.9服务器,拉取centos7 images
命令:
docker pull hello-world
[root@centos79 ~]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:2498fce14358aa50ead0cc6c19990fc6ff866ce72aeb5546e1d59caac3d0d60f
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest
[root@centos79 ~]#
2.查看docker镜像
命令:
docker images | grep hello-world
[root@centos79 ~]# docker images | grep hello-world
hello-world latest feb5d9fea6a5 2 years ago 13.3kB
[root@centos79 ~]#
3.运行docker镜像hello-world
命令:
docker run hello-world
[root@centos79 ~]# docker run hello-worldHello from Doc