How to push a docker image to a private repository

后端 未结 9 1153
再見小時候
再見小時候 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条回答
  •  萌比男神i
    2020-11-29 14:45

    There are two options:

    1. Go into the hub, and create the repository first, and mark it as private. Then when you push to that repo, it will be private. This is the most common approach.

    2. log into your docker hub account, and go to your global settings. There is a setting that allows you to set what your default visability is for the repositories that you push. By default it is set to public, but if you change it to private, all of your repositories that you push will be marked as private by default. It is important to note that you will need to have enough private repos available on your account, or else the repo will be locked until you upgrade your plan.

提交回复
热议问题