How to create named and latest tag in Docker?

后端 未结 6 754
北海茫月
北海茫月 2020-12-04 05:17

Supposed I have an image that I want to tag as 0.10.24 (in my case it\'s an image containing Node.js 0.10.24). I built that image using a Dockerfile and executi

6条回答
  •  春和景丽
    2020-12-04 05:24

    You can have multiple tags when building the image:

    $ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
    

    Reference: https://docs.docker.com/engine/reference/commandline/build/#tag-image-t

提交回复
热议问题