์ธํฐ๋ท ํ๊ฒฝ์ด ์ ๊ตฌ์ถ๋์ด ์๊ธฐ ๋๋ฌธ์
docker image๋ฅผ ์ค์ ํ์ผ๋ก ๋ง๋ค ์ผ์ ์ ์๋ค.
๊ทธ์ ์ ๋น๋ํด์ ์ด๋ฏธ์ง๋ก ๋ง๋ค๊ณ , dockerhub์ ์ ๋ก๋ ํ๋ฉด ๋๊ธฐ ๋๋ฌธ์ด๋ค.๊ทธ๋ฌ๋ ์ธํฐ๋ท์ด ์๋ ํ๊ฒฝ์ด๋ผ๋ฉด?
docker image๋ฅผ ์ค์ ํ์ผ๋ก ๋ง๋ค์ด ์ด์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ณด์.
โ ~ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
test-api latest 969809c19fe0 15 hours ago 470MB
mysql 8.0 c3ef21d6632d 2 days ago 603MB
nginx latest 92b11f67642b 6 weeks ago 187MB
redis 7.0 ffc7b7efc8c1 2 months ago 130MB
mongo 4.2 9b5c4a4fdcb5 10 months ago 388MB
โ backup sudo docker save -o $(pwd)/test-api.tar test-api:latest
โ backup sudo docker save -o $(pwd)/mongo.tar mongo:4.2
โ backup sudo docker save -o $(pwd)/redis.tar redis:7.0
โ backup sudo docker save -o $(pwd)/mysql.tar mysql:8.0
โ backup ls
test-api.tar mongo.tar mysql.tar redis.tar
โ backup sudo docker system prune -a --volumes
โ backup sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
โ backup sudo docker load -i test-api.tar && sudo docker load -i mongo.tar && sudo docker load -i mysql.tar && sudo docker load -i redis.tar
548a79621a42: Loading layer [==================================================>] 65.53MB/65.53MB
009afd448c57: Loading layer [==================================================>] 405kB/405kB
:
:
:
cc67fe8ba93c: Loading layer [==================================================>] 4.096kB/4.096kB
Loaded image ID: sha256:ffc7b7efc8c16eeff6b2e6c99127b76035473c40d550d5b501557fe87db37b42
โ backup sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
test-api latest f0872a588a9f 5 minutes ago 470MB
mysql 8.0 c3ef21d6632d 2 days ago 603MB
redis 7.0 ffc7b7efc8c1 2 months ago 130MB
mongo 4.2 9b5c4a4fdcb5 10 months ago 388MB
โ backup