How to push a docker image to a private repository

后端 未结 9 1144
再見小時候
再見小時候 2020-11-29 14:21

I have a docker image tagged as me/my-image, and I have a private repo on the dockerhub named me-private.
When I push my me/my-image

9条回答
  •  失恋的感觉
    2020-11-29 14:47

    You need to tag your image correctly first with your registryhost:

    docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
    

    Then docker push using that same tag.

    docker push NAME[:TAG]
    

    Example:

    docker tag 518a41981a6a myRegistry.com/myImage
    docker push myRegistry.com/myImage
    

提交回复
热议问题