Docker

docker image를 tar 파일 save / load(화일 다운로드)

주피터0410 2023. 10. 5. 18:00

image 파일로 저장

docker save -o [파일명] [이미지명]
[root@localhost ~]# docker images
REPOSITORY             TAG       IMAGE ID       CREATED         SIZE
gama_ubuntu0.92        latest    0f7a3cb33d65   24 hours ago    3.8GB
gama_ubuntu0.91        latest    c8ebd755ddcc   5 weeks ago     2.81GB
ubuntu_in_apm2         0.97      cb81eca7b3ae   5 weeks ago     18.4GB
unjin_jdk7_tomcat7     0.91      dd1c53af4fac   2 months ago    3.01GB

[root@localhost ~]# docker save -o test.tar gama_ubuntu0.92:latest

 

추출된 이미지는 load 명령어로 도커에 다시 로드

docker load -i [파일명]
[root@localhost ~]# docker load -i test.tar

'Docker' 카테고리의 다른 글

Docker 이미지 생성후 컨테이너 생성  (0) 2023.08.07
Docker 이미지 삭제  (0) 2023.08.07
Docker Pull을 이용해 도커 이미지 갖고 오기  (0) 2023.08.07
Docker 사용법  (0) 2021.11.04