Skip to content

Instantly share code, notes, and snippets.

@jongalloway
Last active September 23, 2017 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jongalloway/f3bf135ac60b742caee73c22fdca0765 to your computer and use it in GitHub Desktop.
Save jongalloway/f3bf135ac60b742caee73c22fdca0765 to your computer and use it in GitHub Desktop.
Saving / Loading a Docker Image
D:\Users\Jon> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/dotnet latest b10593e780a5 39 hours ago 1.64GB
D:\Users\Jon> docker save -o d:\dotnet-docker-image.tar microsoft/dotnet
D:\Users\Jon> docker rmi microsoft/dotnet
Error response from daemon: conflict: unable to remove repository reference "microsoft/dotnet" (must force) - container 40bf430d0282 is using its referenced image b10593e780a5
D:\Users\Jon> docker rmi microsoft/dotnet -f
Untagged: microsoft/dotnet:latest
Untagged: microsoft/dotnet@sha256:56dc4fd6a41f8a8c5784cacfff6be7c39a8e19e4a70307e163f2cf01f864be67
Deleted: sha256:b10593e780a5db944a853d022bf23c80d4e7409ee117a2b63357ba2ce48dc908
D:\Users\Jon> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
D:\Users\Jon> docker load -i d:\dotnet-docker-image.tar
Loaded image: microsoft/dotnet:latest
D:\Users\Jon> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/dotnet latest b10593e780a5 39 hours ago 1.64GB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment