docker export -o .tar
Skip the intermediate uncompressed file step by piping the output directly to a compression utility: docker save ubuntu:22.04 | gzip > ubuntu-22.04.tar.gz Use code with caution. download a docker image as a file
Execute the save command using the -o (output) flag to generate the file. docker save -o ubuntu-22.04.tar ubuntu:22.04 Use code with caution. Step 4: Compress the File (Optional) docker export -o
Docker images are architecture-specific (e.g., AMD64 vs. ARM64). Ensure the host machine where you download the image matches the architecture of the destination machine. download a docker image as a file
docker save -o microservices.tar web-app:latest auth-service:v2 db:15-alpine Use code with caution.