728x90
๋ค์ด๋ก๋ ๋ฐ์ ์ ์๋ registry ๊ฒ์ํ๊ธฐ
$ docker search registry
registry image ๋ค์ด๋ก๋ ๋ฐ๊ธฐ
$ docker image pull registry:latest
registry ์ปจํ ์ด๋๋ฅผ ๋์์ฃผ๋ฉด ๊ตฌ์ถ์ด ์๋ฃ๋๋ค. docker registry ๊ฐ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ฉํ๋ ํฌํธ๊ฐ 5000๋ฒ์ด๋ค !
$ docker container run -d -p 5000:5000 registry:latest
PRIVATE REGISTRY์์ ์ด๋ฏธ์ง ํ์ธํ๋ ๋ช ๋ น์ด
[user@localhost ~]$ curl -X GET http://localhost:5000/v2/_catalog
{"repositories":[]}
ํ์์ ๋ง๊ฒ registry์ ์ฌ๋ฆด ์ด๋ฏธ์ง๋ฅผ ์์ฑํ๋ค
$ docker image tag SOURCE_IMAGE_REPO:TAG localhost:5000/IMAGE_REPO:TAG
[์์]
[user@localhost ~]$ docker image tag mycentos:first localhost:5000/mycentos:first
registry ์ ์ ๋ก๋
docker image push localhost:5000/mycentos:first
registry ์ ์ ์ฌ๋ผ๊ฐ๋์ง ํ์ธํจ
[user@localhost ~]$ curl -X GET http://localhost:5000/v2/_catalog
{"repositories":["mycentos"]}
Private Registry์์ ์ด๋ฏธ์ง ํ๊ทธ ์ ๋ณด ํ์ธ
$curl -X GET http://localhost:5000/v2/IMAGE_REPO/tags/lists
์ฐธ๊ณ ๋ฌธ์
https://docs.docker.com/registry/
728x90
'Cloud Engineering > Docker ๐ณ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[MongoDB] Ubuntu ์์ Docker Compose๋ก MongoDB ReplicaSet ๊ตฌ์ฑํ๊ธฐ (0) | 2023.06.18 |
---|---|
[Docker] Harbor HTTP ๊ตฌ์ฑ์ผ๋ก ๊ตฌ์ถํ๊ธฐ (0) | 2023.02.06 |
[Docker] Harbor HTTPS ๊ตฌ์ฑ์ผ๋ก ๊ตฌ์ถํ๊ธฐ (0) | 2023.02.06 |
[Docker] Docker ์ ์ฅ์์ ์ด๋ฏธ์ง ์ ๋ก๋ํ๊ธฐ (0) | 2023.02.03 |
[Docker] ์ด๋ฏธ์ง ์์ฑํ๊ธฐ - Dockerfile / Commit / import /export / tag (0) | 2023.02.03 |