Inflearn Community Q&A
docker 이미지명은 고유한값이어야 하나요?
Written on
·
256
0
안녕하세요 강의 잘듣고 있습니다.
앞선 강의에서 docker run 이미지명 하게되면
이미지명이 캐시에 있는지 확인하고 없으면 hub에서 가져오신다고 했는데
실습에서 docker create hello-word 하게되면
hello-word 라는 이미지는 hub에도 있는 이미지인데,
로컬에 만드는 이미지명과 hub에 있는 이미지명이 중복되어도 문제가 없나요?
위 경우처럼 로컬에서 만든 이미지와 hub에 있는 이미지를 구분해서 사용하는방법이 있나요?
감사합니다.
Quiz
When running a container using the `docker run image_name command` format, how does the last `command` work?
Added before the base command of the image.
Ignore the image's default command and execute that command.
It runs simultaneously with the base command of the image.
Only runs when the image has no default command.
Answer 1
0
안녕하세요 !!!
docker run hello-world 라고 하면 hello-world 이미지를 가져와서 실행하지만
docker create hello-world는 도커 허브에 있는 hello-world를 가져와서 생성하지 않습니다.
그저 비어있는 이미지가 됩니다.
또한 hello-world라는 이름으로 이미지를 만들어도 도커 허브에 그 이름으로 들어가지지 않습니다 ~
그래서 도커 이름을 만드는 규칙이 있는데 그것이 <도커 아이디/프로젝트 이름> 이런식으로 이름을 지어주시면 됩니다 ~ !




