当前位置:首页 > 编程笔记 > 正文
已解决

3-运行第一个docker image-hello world

来自网友在路上 160860提问 提问时间:2023-11-19 06:48:15阅读次数: 60

最佳答案 问答题库608位专家为你答疑解惑

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
查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"3-运行第一个docker image-hello world":http://eshow365.cn/6-38999-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!