본문 바로가기

클라우드/도커(Docker)

도커 Docker 이미지 제작 1

더보기

# 도커 로그인
vagrant@docker:~$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: daaa0555
Password: 
WARNING! Your password will be stored unencrypted in /home/vagrant/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

# 도커 tag
# 이름을 변경하거나 태그를 붙일수있다 
# 태그를 삭제하려면 이미지 제거
vagrant@docker:~$ docker tag hello-world:latest daaa0555/hello
                                                 계정명
# 저장소에 이미지 업로드
vagrant@docker:~$ docker push daaa0555/hello
Using default tag: latest
The push refers to repository [docker.io/daaa0555/hello]
f22b99068db9: Mounted from library/hello-world 
latest: digest: sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 size: 525

 

더보기

# 태그 바꿔서 이미지 업로드
vagrant@docker:~$ docker tag hello-world:latest daaa0555/hello:v2
vagrant@docker:~$ docker push daaa0555/hello:v2
The push refers to repository [docker.io/daaa0555/hello]
f22b99068db9: Layer already exists 
v2: digest: sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 size: 525