[Docker] Docker Image 복사
less than 1 minute read
Docker Image 복사
# 복사하고 싶은 docker image 정보 확인
docker images
# 해당 docker image를 tar 파일로 변환 docker save -o [tar file name] [repository_name:tag_name]
docker save -o mysql1.tar mysql1:lernen
# [file_name].tar을 다른 컴퓨터로 옮기기
# image를 업로드하기 docker load -i <path to image tar file>
docker load -i mysql1.tar
# 최종 확인
docker images
# push to registry
# change tag(docker tag {image_name}:{tag} {domain_name.com}:{port}/{project_name}/{image_name}:{tag})
docker tag spark:3.3.2 172.16.30.194:80/dp/spark:3.3.2
# push(docker push {domain_name.com}:{port}/{project_name}/{image_name}:{tag})
docker push 172.16.30.194:80/dp/spark:3.3.2
ref