Nginx实践(1)--Docker部署Nginx

 一、镜像的拉取
 
1、查看本地是否存在目标镜像
 
[root@localhost /]# docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
sonatype/nexus3       latest              640570fd0ff5        3 months ago        642MB
jpress_web            latest              cc0caef802bb        9 months ago        529MB
tomcat                latest              8973f493aa0a        9 months ago        508MB
ubuntu                <none>              2ca708c1c9cc        9 months ago        64.2MB
mysql                 latest              b8fd9553f1f0        10 months ago       445MB
portainer/portainer   latest              2b4ddf654e1c        11 months ago       77.7MB
rabbitmq              3.7.8-management    d69a5113ceae        20 months ago       149MB
java                  8                   d23bdf5b1b1b        3 years ago         643MB
[root@localhost /]#

 

 
2、从远程仓库拉取镜像
 
一般拉取tag为latest的最新版本
[root@localhost /]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
8559a31e96f4: Pull complete
8d69e59170f7: Pull complete
3f9f1ec1d262: Pull complete
d1f5ff4f210d: Pull complete
1e22bfa8652e: Pull complete
Digest: sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

 

 
下载完后,再查看本地镜像,可见Nginx镜像已下载到本地
[root@localhost /]# docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
nginx                 latest              2622e6cca7eb        4 weeks ago         132MB
sonatype/nexus3       latest              640570fd0ff5        3 months ago        642MB
jpress_web            latest              cc0caef802bb        9 months ago        529MB
tomcat                latest              8973f493aa0a        9 months ago        508MB
ubuntu                <none>              2ca708c1c9cc        9 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值