create multiple tag docker image

后端 未结 3 1201
春和景丽
春和景丽 2020-12-07 17:31

How can several tags be attached to one Docker image? Is it possible to create multiple tags using one Dockerfile?

It is possible, somehow;

3条回答
  •  一向
    一向 (楼主)
    2020-12-07 17:49

    You can't create tags with Dockerfiles but you can create multiple tags on your images via the command line.

    Use this to list your image ids:

    $ docker images
    

    Then tag away:

    $ docker tag 9f676bd305a4 ubuntu:13.10
    $ docker tag 9f676bd305a4 ubuntu:saucy
    $ docker tag eb601b8965b8 ubuntu:raring
    ...
    

提交回复
热议问题