论docker中的中间层镜像

ubuntu@VM-16-15-ubuntu:~/gohello$ cat  >> Dockerfile
# hello-world Dockerfile
FROM scratch
LABEL version="1.0"
LABEL syh="nb"
COPY hello /
LABEL version="2.0"
CMD ["/hello"]

ubuntu@VM-16-15-ubuntu:~/gohello$ docker image build -t gohello:latest  .
Sending build context to Docker daemon  2.028MB
Step 1/6 : FROM scratch
 ---> 
Step 2/6 : LABEL version="1.0"
 ---> Running in b6941f1bb9fe
Removing intermediate container b6941f1bb9fe
 ---> 3ab8ff1b3ed1
Step 3/6 : LABEL syh="nb"
 ---> Running in 638330c50012
Removing intermediate container 638330c50012
 ---> 1ffb399b72c6
Step 4/6 : COPY hello /
 ---> f090bfcfa0c9
Step 5/6 : LABEL version="2.0"
 ---> Running in d4aee950b0af
Removing intermediate container d4aee950b0af
 ---> 521ea3d7beb6
Step 6/6 : CMD ["/hello"]
 ---> Running in a46816331893
Removing intermediate container a46816331893
 ---> 5d0ac51a55df
Successfully built 5d0ac51a55df
Successfully tagged gohello:latest
ubuntu@VM-16-15-ubuntu:~/gohello$ docker image ls -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              521ea3d7beb6        5 seconds ago       2.01MB
gohello             latest              5d0ac51a55df        5 seconds ago       2.01MB
<none>              <none>              f090bfcfa0c9        5 seconds ago       2.01MB
<none>              <none>   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值