Is it possible for image to have multiple tags?

前端 未结 5 400
一整个雨季
一整个雨季 2021-02-02 05:45

When I am pushing new image to repo I would like it to have two tags for example 0.2 and latest. This would allow to always pull latest image version b

5条回答
  •  一生所求
    2021-02-02 06:16

    You need to do one push per each version like:

    docker tag test:latest //test:latest
    docker push //test:latest
    
    docker tag test:0.2 //test:0.2
    docker push //test:0.2
    

    You can also combine and say the latest version is 0.2 like:

    docker tag //test:latest //test:0.2
    docker push //test:0.2
    

    So those will point the same image layer.

提交回复
热议问题