Docker Registry 컨테이너 보관창고
- Docker Registry는 컨테이너 이미지를 저장하는 저장소를 말한다.
- 도커닷컴에서 직접 운영중인 Public 도커 허브(hub.docker.com)가 있고, 사내 컨테이너 저장소인 Private Registry 등 2종류가 있다.
- docker hub에 있는 이미지를 웹으로 검색할 수도 있고, cli환경에서 docker search [키워드명] 명령어를 통해서도 검색 가능하다.
- 사내에서 private 컨테이너 저장소를 운영할 수 있도록 도와주는 registry 컨테이너
https://hub.docker.com/_/registry
registry - Official Image | Docker Hub
About Official Images Docker Official Images are a curated set of Docker open source and drop-in solution repositories. Why Official Images? These images have clear documentation, promote best practices, and are designed for the most common use cases.
hub.docker.com
- private image repository를 사용할 땐, 아래처럼 hostname과 port 번호를 함께 써줘야됨
localhost:5000/ubuntu:18.04
docker.example.com:5000/ubuntu:18.04
- registry 실행
docker run -d -p 5000:5000 --restart always --name registry registry:2
- private 저장소에 push 하기 위해 tag 이름 변경
docker tag httpd:latest localhost:5000/httpd:latest
- private 저장소에 push
docker push localhost:5000/httpd:latest
- 로컬에 업로드 한 이미지 확인
ls /var/lib/docker/volumes/~~~uuid~~~/_data/docker/registry/v2/repositories
출처 : 따배도
5-1. 컨테이너 보관창고 - 이론편
5-2. 컨테이너 보관창고(Docker Registry) - 실습