Saving An Image As A File

Pull Down An Image From Docker Registry

Pull down the docker image (docker pull) called python:3.8-slim from Docker.io (the default registry).

docker pull python:3.8-slim
3.8-slim: Pulling from library/python
Digest: sha256:f7edd1bb431a224e7f4f3e23cbb22738e82f4895a6d28f86294ce006177360c3
Status: Image is up to date for python:3.8-slim
docker.io/library/python:3.8-slim

Save Image As A File

Save the Docker image (docker save) python:3.8-slim to the file (-o) named python-3.8.tar.

docker save -o python-3.8.tar python:3.8-slim

Check File Exists

View all files and folders (ls) that displays using long format and shows hidden files (-al)

ls -al
total 1432
drwxrwxr-x 2 chris chris    4096 Aug  1 20:39 ./
drwxr-xr-x 3 chris chris    4096 Jul 25 12:22 ../
-rw------- 1 root  root  1451008 Aug  1 20:39 python-3.8.tar