docker镜像
2021/12/24 6:08:57
本文主要是介绍docker镜像,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
hello-world 最小的镜像
从Docker Hub 下载这个镜像
[root@mcw1 /application]$ 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@mcw1 /application]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
httpd latest dabbfbe0c57b 3 days ago 144MB
hello-world latest feb5d9fea6a5 3 months ago 13.3kB
运行hello-world容器,很快容器就退出了
[root@mcw1 /application]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c8b617d91943 httpd "httpd-foreground" 25 hours ago Up 24 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp sweet_curran
[root@mcw1 /application]$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
......
[root@mcw1 /application]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c8b617d91943 httpd "httpd-foreground" 25 hours ago Up 25 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp sweet_curran
[root@mcw1 /application]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
81f8c132267c hello-world "/hello" About a minute ago Exited (0) About a minute ago hungry_keldysh
这篇关于docker镜像的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-09-29100 个常见的 Docker 错误及解决方案
- 2024-09-26制作 llama3 RAG 系统的 Docker 容器
- 2024-09-25Podman — 一个简单、轻量的 Docker 替代品
- 2024-09-25Docker 快速参考指南(初学者版) ??
- 2024-09-25使用 Docker 在单个 VPS 上部署多个应用
- 2024-09-21Docker环境部署资料:新手入门指南
- 2024-09-20Docker环境部署项目实战:新手入门全攻略
- 2024-09-20Docker环境部署:新手入门教程
- 2024-09-20Docker环境部署学习:从入门到实践
- 2024-09-20Docker环境部署入门:新手必读指南