[DevOps - CentOS 7.9] Docker Local Registry ์‚ฌ์šฉ๋ฒ•

2022. 11. 16. 22:00ใ†System ์ž‘์—…์‹ค/Docker

728x90
๋ฐ˜์‘ํ˜•






๐Ÿ—‚ ๋ชฉ์ฐจ

โ— [DevOps - CentOS 7.9] Docker Local Registry (๊ฐœ์ธ Docker Hub) ๊ตฌ์ถ•ํ•˜๊ธฐ 
โ— [DevOps - CentOS 7.9] Docker Local Registry ์‚ฌ์šฉ๋ฒ•
โ— [DevOps - CentOS 7.9] Docker Remote Registry ์‚ฌ์šฉ๋ฒ•







๐Ÿš€ Docker Registry ์ด์šฉ

    ๐Ÿ”ฝ  ํ™”๋ฉด

        ๐Ÿ“ฆ DevInquryReplyVO.java

์ตœ์ดˆ ์—ฐ์Šต์šฉ์œผ๋กœ ์‚ฌ์šฉํ•  hello-world Docker Image๋ฅผ Pullํ•ด ์ค„๊ฒŒ์š”.

docker pull hello-world


์ด๋ฒˆ์—๋Š” ๋‚ด๋ ค ๋ฐ›์€ Docker Image๋ฅผ ๋‚˜๋งŒ์˜ Image๋กœ ๋ฐ”๊ฟ€๊ฑฐ์—์š”.
์—ฌ๊ธฐ์„œ ์ค‘์š”ํ•œ ๊ฑด Image ์ด๋ฆ„์— Docker Registry ์ •๋ณด๋ฅผ ๊ผญ ๋„ฃ์–ด์ค˜์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์ด์—์š”.



docker tag {Docker Hub์—์„œ ๋‚ด๋ ค ๋ฐ›์€ Image ์ด๋ฆ„} {Docker Registry IP:Port}/{๋งŒ๋“ค Docker Image ์ด๋ฆ„}



docker images


Docker Image๊ฐ€ ์ž˜ ๋งŒ๋“ค์–ด ์ง„ ๊ฑธ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.



docker push docker tag {Docker Hub์—์„œ ๋‚ด๋ ค ๋ฐ›์€ Image ์ด๋ฆ„} {Docker Registry IP:Port}/{๋งŒ๋“ค Docker Image ์ด๋ฆ„}


์œ„์™€ ๊ฐ™์ด docker push๋ฅผ ์ด์šฉํ•ด์„œ ๋งŒ๋“ค์–ด๋‘” Docker Registry์— push๋ฅผ ํ•ด ์ฃผ์—ˆ์–ด์š”.




vim /etc/docker/daemon.json

๋ฐ˜์‘ํ˜•
{
        "insecure-registries":["{Registry IP:Port}"]
}




์ƒˆ๋กญ๊ฒŒ ๋งŒ๋“  Registry์˜ ๊ฒฝ์šฐ Docker daemon์— insecure-registries๋ฅผ ๋“ฑ๋กํ•ด ์ฃผ์–ด์•ผ ํ•ด์š”.

์œ„์™€ ๊ฐ™์ด Editor๋ฅผ ์ด์šฉํ•˜์—ฌ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.


๊ทธ๋Ÿฐ ๋’ค ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด Docker๋ฅผ ์žฌ์‹œ์ž‘ ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.


systemctl restart docker
728x90





๐Ÿง ์ฐธ๊ณ  ์ž๋ฃŒ

 

Docker Local Registry ๊ตฌ์ถ•

๊ตฌ์ถ•ํ™˜๊ฒฝ Host VMware® Workstation 14 Player 14.0.0 build-6661328 OS Ubuntu 16.04.6 LTS Application - Docker : 19.03.5, build 633a0ea838 - docker-compose : 1.11.2, build dfed245 - git : 2.7.4 Docker Image๋ฅผ ํ™œ์šฉํ•œ Local Registry ๊ตฌ์ถ• Docker Regis

hihellloitland.tistory.com

 

 

 

 

 

 

 

728x90
๋ฐ˜์‘ํ˜•