Search code examples
dockerdocker-registry

It is possible to push a docker image inside a docker container?


I have a docker-in-docker container, which we'll call "dind". And a large image, which we'll call "LI".

Dind is responsible for make some docker runs calls. I need to run LI inside Dind. Normally, I push LI to a registry and pull it inside Dind. But I have a bad internet network. it takes a whole life to do this...

So, I was thinking if it is possible to push a docker image inside a docker container.


Solution

  • You should not need to go over the network for this.

    First, save LI to a local tarball

    Then, in DIND use docker import.

    Or alternatively, when you run DIND mount the LI tarball directly