Ubuntu 通过 docker 安装 Nginx 镜像 + 创建并运行 nginx01 容器

一、安装 nginx:精简版镜像

1. 查找有什么类型的 nginx 镜像

yammie@my-pc >/home/yammie
$ docker search nginx

2. 下载精简版 nginx 镜像

yammie@my-pc >/opt
$ docker pull nginx:alpine
alpine: Pulling from library/nginx
46b060cc2620: Already exists
21af147d2ad5: Pull complete
b3ee43e51ca6: Pull complete
b17a9d410da1: Pull complete
542e3e75411d: Pull complete2b2faad386df: Pull complete
a5e22afba545: Pull complete
fb923a41dc10: Pull complete
Digest:
sha256:208b70eefac13ee9be00e486f79c695b15cef861c680527171a27d253d834be9
Status: Downloaded newer image for nginx:alpine
docker.io/library/nginx:alpine

3. 查看已经下载的镜像

yammie@my-pc >/opt
$ docker images

猜你喜欢

转载自blog.csdn.net/qq_33653203/article/details/141090825
今日推荐