0

I have a docker hub with a private and a public space.

I would like to commit a modified version of the public image to the private one.

How can I do that?

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 488cbc12c206 archstrike-with-readme "bash" 9 seconds ago Up 7 sec

Hub address: https://hub.docker.com/u/aurelien2a/

push from archstricke (public) to a private one

  • 2
    Could you provide me some more information. have you tried anything so far. – Mongrel Dec 30 '16 at 9:45
  • added the running one and hub address. Is that enough? @Mongrel – aurelien Dec 30 '16 at 9:51
1

on Docker Hub, you can have public or private repositories. You have to tag your image with the URL of one of your private repo, and then push it. If priv is your private repository:

  • docker tag 488cbc12c206 aurelien2a/priv/myimage:1.0
  • docker push aurelien2a/priv/myimage:1.0

or something similar

  • that does not works: docker push hub.docker.com/u/aurelien2a/private/blackarch:1.0 The push refers to a repository [hub.docker.com/u/aurelien2a/private/blackarch] 14b4657a4156: Preparing f657b85d5601: Preparing Index response didn't contain any endpoints – aurelien Dec 30 '16 at 12:10
  • sorry, I made a typo in the repo name in the second command – Jean-Pascal J. Dec 30 '16 at 12:17
  • hum ... got the same .. or I do not see the point: $ docker tag 2ec1aee68d12 hub.docker.com/u/aurelien2a/priv/blackarch:1.0 aurelien@icesheet:~$ docker push hub.docker.com/u/aurelien2a/priv/blackarch:1.0 The push refers to a repository [hub.docker.com/u/aurelien2a/priv/blackarch] 14b4657a4156: Preparing f657b85d5601: Preparing Index response didn't contain any endpoints – aurelien Dec 30 '16 at 12:21
  • got it! just reduce to the correct place without the docker.io – aurelien Dec 30 '16 at 12:23
  • docker push aurelien2a/blackarch:latest The push refers to a repository [docker.io/aurelien2a/blackarch] 14b4657a4156: Pushing 121.4 MB/671.9 MB f657b85d5601: Mounted from aurelien2a/archstrike – aurelien Dec 30 '16 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.