Docker Tip #97: Save and Load Docker Images from a Zip File

preview_player
Показать описание
Transfer an image to a server without a Docker Registry or building it directly on your server.

Hit the subscribe button to receive more videos like this!

REFERENCE LINKS
---------------------------------------------------

COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.

THE TOOLS I USE / GEAR
---------------------------------------------------

FOLLOW ME ELSEWHERE
---------------------------------------------------

TIMESTAMPS
---------------------------------------------------
0:05 -- Use cases
1:56 -- Saving an image to a gzip file
3:11 -- Loading an image
4:00 -- Docker image tag vs Docker id
5:32 -- 1 liner to save and send the image to a server
Рекомендации по теме
Комментарии
Автор

I made a slightly confusing but minor error around the save command. The load command will seamlessly handle gzipped files but the save command does not. As is on video the first saved file will not be gzipped, only the piped 1 liner at the end will be. If you want to save the gzipped image you can use `docker image save nickjj/webserver:v0.3.4 | gzip > webserver.tar.gz`. If you compare both you'll see the size on disk is smaller with the gzipped version.

NickJanetakis
Автор

Thanks for the video. I would like to know how to avoid losing db on docker db image upgrade. I always get error that the database build version is different than the new version when i upgrade postgresql image

tijlip
Автор

always was wondering if volumes can be imported/exported in such easy way as well

birdie