Local Machine (Desktop/Laptop) → Azure VM (Linux & Windows)
Use this guide to move Docker images to an Azure VM with restricted networking by saving the image on your laptop, uploading the file to your anDREa workspace, and loading it on the VM.
0) Prerequisites
- You have the required privileges to upload files to your anDREa workspace.
- Docker is installed on your laptop and on the VM.
- Image OS/architecture match:
- Linux VM → Linux images (linux/amd64 or linux/arm64).
- Windows VM → Windows images (e.g., windows/nanoserver, windows/servercore).
- Architecture matters (amd64 vs arm64)
1) On Your Laptop (common to Linux/Windows)
- Pull the right platform (adjust name/tag):
- # Most Azure Linux VMs are x86_64 → linux/amd64
- docker pull --platform=linux/amd64 myregistry/myimage:tag
- Save to a tar file (keeps layers & metadata):
- docker save -o myimage.tar myregistry/myimage:tag
- (Optional, but handy) Compress to reduce upload size:
- # If gzip is available
- gzip -9 myimage.tar # → myimage.tar.gz
- > On Windows, you can use tar.exe (built‑in) or 7‑Zip to compress.
- Upload ‘myimage.tar’ (or .tar.gz) to your anDREa workspace using any of the available upload mechanisms.
- Bundle multiple images (Compose stack)
- Bash (Linux/macOS):
- docker compose pull
- docker save -o stack.tar $(docker compose images --quiet | sort -u)
- PowerShell (Windows):
- docker compose pull
- $imgs = docker compose images --quiet | Sort-Object -Unique
- docker save -o stack.tar $imgs
2) On the Azure Linux VM
- Locate the upload on the mounted share (example paths below).
- Load the image into Docker:
- # If you uploaded a .tar.gz, Docker can auto-detect gzip
- sudo docker load -i /mnt/data/inbox/transfer/myimage.tar.gz
- # Or plain tar
- sudo docker load -i /mnt/data/inbox/transfer/myimage.tar
- Verify and run:
- docker images | grep myimage
- docker run --rm -it myregistry/myimage:tag
3) On the Azure Windows VM
- Ensure you are using the correct container mode:
- Windows Server typically runs Windows containers.
- Windows 10/11 with Docker Desktop can run Linux or Windows containers (toggle mode).
A) Windows Server (Docker Engine, Windows containers)
- Open PowerShell as Administrator.
- Load the image from the share:
- docker load -i \\fileserver\share\myimage.tar # UNC path
- # or if mapped to drive Z:
- docker load -i Z:\myimage.tar
- Verify and run:
- docker images | findstr myimage
- docker run --rm -it myregistry/myimage:tag
- Make sure the image is a Windows base image (e.g., nanoserver/servercore) when in Windows container mode.
B) Windows 10/11 with Docker Desktop (Linux or Windows containers)
- Switch container mode if needed:
- Linux images: set Docker Desktop to Linux containers (WSL2 backend).
- Windows images: switch to Windows containers.
- (Quick check)
- docker info --format '{{.OSType}}/{{.Architecture}}'
- Load the image from the share:
- docker load -i Z:\myimage.tar
- Verify & run as above.
4) Quick Checks & Commands
- VM architecture (Linux):
- uname -m → x86_64 = amd64, aarch64 = arm64.
- Docker daemon OS/arch:
- docker info --format '{{.OSType}}/{{.Architecture}}'
- List images with digests:
- docker images --digests myregistry/myimage
- Test without network:
- docker run --rm myregistry/myimage:tag cmd args
5) Path Examples for the File Share
- Linux VM: /mnt/data/inbox/transfer-2019-08-21/<filename>
- Windows VM:
- \\storageacct.file.core.windows.net\share\folder\myimage.tar or mapped drive like Z:\folder\myimage.tar.
Related Articles
Docker
Docker is a tool that essentially lets you package a (development) environment with all its settings and dependencies, and move it to another machine, such that whatever you create and develop works the same on every machine you want to run it on. ...
Docker stopped working on Windows VMs - summary of tests and alternative
First version: 2023-10-30 Last version: - Last change: - This is a community effort. The article was created by the anDREa Support Team in their spare time. If you have found a more efficient way to approach this, please contact us and we will update ...
Installing docker on Ubuntu 22
First version: 2023-11-24 Last version: 2024-01-12 Last change: Small corrections to reflect that domain allowlisting is now a self-service feature. This is a community effort. The article was created through collaboration of the anDREa Support Team ...
NVIDIA-docker
This article describes how to install NVIDIA-docker on a Linux VM in two parts. kudos to Bob van Dijk - Amsterdam UMC Download and ingress the attachment for easy copy/paste. Part 1: install and start the latest NVIDIA drivers for your GPU card Open ...
[RESOLVED] Image Gallery Feature Error
First version: 2024-09-12 @ 12:15 Last updated: 2024-09-12 @ 12:50 Last change: Added the resolution, moved article to resolved. Dear all, Yesterday, September 11, an issue was identified related to the new Image Gallery feature when trying to deploy ...