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

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
---------------------------------------------------
► nickjanetakis.com/blog/docker...
COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.
► nickjanetakis.com/courses/
THE TOOLS I USE / GEAR
---------------------------------------------------
► nickjanetakis.com/blog/the-to...
FOLLOW ME ELSEWHERE
---------------------------------------------------
► Twitter: / nickjanetakis
► GitHub: github.com/nickjj
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

Пікірлер: 6

  • @NickJanetakis
    @NickJanetakis3 ай бұрын

    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. Sorry about that! I updated the blog post version of the video to reflect this: nickjanetakis.com/blog/docker-tip-97-save-and-load-docker-images-from-a-zip-file

  • @birdie0
    @birdie03 ай бұрын

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

  • @NickJanetakis

    @NickJanetakis

    3 ай бұрын

    This blog post from Docker www.docker.com/blog/back-up-and-share-docker-volumes-with-this-extension/ has a few options. Both a CLI option and using Docker Desktop.

  • @birdie0

    @birdie0

    3 ай бұрын

    @@NickJanetakisthanks, it seems easier than i expected.

  • @tijlip
    @tijlip3 ай бұрын

    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

  • @NickJanetakis

    @NickJanetakis

    3 ай бұрын

    Hi, you can backup and restore your DB in a similar way that you would do it without Docker. For example, performing a pg_dump and import. I have a blog post from years ago covering the import nickjanetakis.com/blog/docker-tip-49-important-a-database-sql-file-with-docker-compose, you can Google around for dumping since it's no different than without Docker.