0

I've an image from another repo I'd like to upload to my docker repo.

I've managed to save it:

docker save <imageId> -o mydockersimage.tar

Now how can I upload this image to my public repo? Sorry if that's dumb, I'm getting started with docker

Guig
  • 9,891
  • 7
  • 64
  • 126
  • What do you mean by "my public repo" ? Please provide more details what you try to achieve – agg3l Oct 21 '16 at 07:23
  • Possible duplicate of [How to push a docker image to a private repository](http://stackoverflow.com/questions/28349392/how-to-push-a-docker-image-to-a-private-repository) – Rao Oct 21 '16 at 08:42
  • No, @Rao, this question is 1) about pushing to a private repo 2) an image already tagged – Guig Oct 21 '16 at 18:56
  • Yes, that was to push to a private repo only. Any way, looks you got answer already. – Rao Oct 21 '16 at 18:58
  • indeed I got the response I needed :) – Guig Oct 21 '16 at 22:26

3 Answers3

1

Please follow these steps:

Load the image:

docker load < busybox.tar.gz

Verify:

docker images

Tag the image (note image id from output of previous step):

docker tag 7d9495d03763 yourusername/yourimagename:latest

Login:

docker login 

Push the image:

docker push yourusername/yourimagename
Farhad Farahi
  • 35,528
  • 7
  • 73
  • 70
0

If you want to upload an image to a repository you should tag your image

docker tag [initial-image] [reponame]\[imagename]:[tag]

and then push it

docker push [reponame]\[imagename]:[tag]
bolivier
  • 175
  • 2
  • 10
0

If you just want to put your image to a new computer you can import this image copy the mydockersimage.tar to the new computer and do

docker import /path/to/mydockersimage.tar

But I thing it not a good practice I encourage you to do a push like my previous answer.

bolivier
  • 175
  • 2
  • 10