search

Home  >  Q&A  >  body text

不通过 docker hub 怎样把 docker image 共享给别人

docker image 是存放在哪个目录的,在不联互联网的情况下,怎样把 docker image 分享给局域网的其他用户?

阿神阿神2763 days ago941

reply all(5)I'll reply

  • 迷茫

    迷茫2017-04-21 11:18:02

    Suppose you have an image called ubuntu, then you can use the save and load commands to transfer the image:

    Execute on local machine
    sudo docker save -o ubuntu.tar ubuntu

    The ubuntu.tar file is obtained, copy it to the remote machine, and execute

    sudo docker load < ubuntu.tar

    That’s how it happened...

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 11:18:02

    docker export/import?

    reply
    0
  • 迷茫

    迷茫2017-04-21 11:18:02

    keywords: docker image location

    http://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine
    http://alexander.holbreich.org/2014/07/moving-docker-images-different-partition/

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:18:02

    In addition to the export/import mechanism of docker mentioned by others, you can also build your own private docker registry.

    DigitalOcean has an excellent tutorial:

    https://www.digitalocean.com/community/tutorials/how-to-set-up-a-priva...

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-21 11:18:02

    How to save has been explained clearly. However, it is not clear how to transmit it. Here I will talk more about how to transmit it. Assume that the name of the package is xiaoming/ubuntu. Let’s save it in tmp first.

    sudo docker save -o /tmp/ubuntu.tar xiaoming/ubuntu

    Then we can open a micro download server.

     python -m SimpleHTTPServer 8001

    Finally go to other servers

    wget http://ip:8001/ubuntu.tar

    That’s it.

    reply
    0
  • Cancelreply