일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Jupyter notebook
- HookNet
- aiffel exploration
- AIFFEL
- GIT
- Pull Request
- ssh
- 프로그래머스
- 히비스서커스
- cocre
- numpy
- WSSS
- 오블완
- 코크리
- Multi-Resolution Networks for Semantic Segmentation in Whole Slide Images
- 기초확률론
- Decision Boundary
- docker
- 도커
- docker attach
- vscode
- IVI
- cs231n
- 백신후원
- docker exec
- 티스토리챌린지
- CellPin
- airflow
- logistic regression
- 사회조사분석사2급
- Today
- Total
히비스서커스의 블로그
[Docker] 현재 container상태 그대로 image에 저장 및 docker hub에 push 본문
[Docker] 현재 container상태 그대로 image에 저장 및 docker hub에 push
HibisCircus 2022. 5. 18. 12:11
다른 서버로 현재 도커 컨테이너 상태 그대로 옮겨야 할 일이 생겼다. 이때 활용하기 좋은 방법으로 현재 container상태 그대로 image로 저장하는 명령어 docker commit과 image를 다른 서버나 pc로 옮길 수 있는 docker push를 정리해보았다.
docker commit
$ docker commit (현재 contianer 이름) (저장할 이미지명)
예시
$ docker commit hibiscircus gotjd709/hibiscircus:latest
docker push
1) 먼저 도커 허브에 계정을 만든다.
Docker Hub Container Image Library | App Containerization
We and third parties use cookies or similar technologies ("Cookies") as described below to collect and process personal data, such as your IP address or browser information. You can learn more about how this site uses Cookies by reading our privacy policy
hub.docker.com
2) 그 다음 서버에서 도커 로그인을 한다.
$ docker login
3) 이미지 파일을 push 한다.
$ docker push (push할 image명)
예시
$ docker push gotjd709/hibiscircus:latest
이때, image명이 (docker hub의 계정)/(원하는 image명):tag 과 같은 형태로 되어야 push가 가능하다. 이와 같지 않은 경우 아래와 같은 에러가 발생할 수 있다.
denied: requested access to the resource is denied
그래도 반복된다면 다시 한번 도커 로그인을 한 후 다시 시도해보면 해결이 될 듯 하다.
-히비스서커스-