리눅스
Docker image 옮기기
파인진
2022. 8. 30. 08:19
반응형
Dockerk image를 Docker hub에 push하고 pull하여 필요한 이미지를 가져다가 사용한다.
직접 파일을 옮겨야할 때 Docker image를 .tar파일로 만들어서 옮기는 방법
이미지 확인
# docker images
Docker image 저장
# docker save [option] {파일명} [이미지명:태그]
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
Save one or more images to a tar archive (streamed to STDOUT by default)
Options:
-o, --output string Write to a file, instead of STDOUT
Docker image 불러오기
#docker load -i {파일명.확장자}
Options:
-i, --input string Read from tar archive file, instead of STDIN
-q, --quiet Suppress the load output
Docker image를 확인 하면 새로 불러온 이미지가 보입니다.
반응형