Docker Community Forums

Share and learn in the Docker community.

Container file from Docker-less PC to offline VM

First time docker user so bear with me here, sorry if there was a better place for this. So I’m stuck on getting containers into my isolated environment.

My setup is a master node VM running Ubuntu 20.04 that has no access to internet or any other storage network and then a separate machine running Windows 10 Enterprise that has internet access but CANNOT have Docker on it due to security policies.

I managed to get docker installed onto it by downloading the containerd, docker-ce, and docker-ce_cli and packaging them into an ISO with WinISO then mounting and copying those files to the VM. Now I’m stuck trying to get containers (hello-world for testing purposes) onto the VM. I’ve seen people talk about using docker pull to get the container on a machine then exporting it but I don’t have access to any docker pull command that can get out tot he Internet. I’ve seen wget almost do what I’m asking but the solution always uses docker pull at some point on the non-isolated machine.

Is there any way to download a container file from Docker HUB on a Windows PC that can be packaged onto an ISO and mounted onto an isolated VM?

Thanks in advance, at this point any advice is welcome on the subject.

1 Like

You will have to script everything yourself. Though, what is wrong with using shared folders to exchange data from your machine to the vm instead of packaging all files into an iso?

How about using https://gitlab.com/Jancsoj78/dockerless_docker_downloader to download images from powershell? Then you should be able to package them in whatever way you like.

Thank you much! Glad to have something to go on, I’ll give it a shot and post up my results.

As far as using shared folders I was informed that they don’t want any resources linking the live environment to the cluster whatsoever. That may change once things are confirmed as live I can lock things down, in which case I can rebuild the environment in half the time, but as it stands looks like I have a tedious road ahead. Oh well, at least I’ll get to understand things better.

Bug fixes and minor changes
Hyper-V

Create drive symlinks in VM at startup to avoid breaking setup that was using them. Fixes docker/for-win#6628.
Implement fallocate for shared filesystems. See docker/for-win#6658.
WSL 2

Configure CLI to use Docker Desktop credential store.
Adds a restart button to the popup prompting the user to install the Linux kernel.
More reliable bootstrap, do not rely on wslpath for path translation, retry mounts on errors at startup.
Dashboard

Fixed containers logs which were sometimes truncated. Fixes docker/for-win#5954
Fixed open with vs code button for compose app deployed from a WSL 2 Linux Workspace.
Other fixes

Fixed an installer crash when an old and/or partially uninstalled version of Docker Desktop was present on the system. Fixes docker/for-win/6536.
Fixed home expansion when using tilde in bind mounts source (for example, -v ~/dir:/vm-dir)
localhost and 127.0.0.1 can both be used in the proxy settings to redirect to a proxy on the host. Fixes docker/for-win#5715.
Fixed a typo in the backend destroy notification. Fixes docker/for-win#6739.
Fixed a crash which sometimes occurred when Docker Desktop loads a corrupted Docker CLI configuration file. Fixes docker/for-win#6657.
Fixed a delay when opening the systray menu. Fixes docker/for-win#1011.
Known issues
WSL 2

Swarm service bind mounts are not always restored correctly.
Bind mounts of files living outside of the root mount point (files within /mnt/c, /tmp, /run…) don’t work correctly when multiple containers mount them.

I am not sure if a windows version of the docker cli exists that support docker context, which allows to set the context to a remote docker engine. All follow up commands will be executed against the remote docker engine. It would allow to use “docker load” to push the downloaded container-images into the remote engine.