Skip to main content
Version: 1.3

Registry

๊ฐœ์š”#

CAP ๋‚ด์— image registry๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ ์†๋„ ํ–ฅ์ƒ๊ณผ ๋ณด์•ˆ์„ ํ•œ์ธต ๋” ๊ฐ•ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ#

  • New Project ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. new_project
  • ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜๊ณ  OK ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. Public์„ ์ฒดํฌํ•˜๋ฉด ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์˜ ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ๋ˆ„๊ตฌ๋“  pull ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    name_project

์ด๋ฏธ์ง€ push & pull#

  • ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ์ด๋ฏธ์ง€๋ฅผ push ํ•˜๊ธฐ ์œ„ํ•ด์„  ๋„์ปค ๋กœ๊ทธ์ธ์ด ์„ ํ–‰๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    docker login harbor.dudaji.com
  • ๋˜ํ•œ pushํ•  ์ด๋ฏธ์ง€ ์ด๋ฆ„์„ ํ•ด๋‹น ๊ทœ์น™์— ๋งž์ถฐ ์ž‘์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    registry_url/project_name/image_name:tagex) harbor.dudaji.com/dudaji/alpine:latest
  • ๊ธฐ์กด์˜ ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œ ํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์ด๋ฏธ์ง€ ์ด๋ฆ„์„ ๋ณ€๊ฒฝ ํ›„ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
    docker image tag [image_name] [new_name]
  • ์œ„ ๊ทœ์น™์— ๋งž์ถฐ ์ด๋ฏธ์ง€์˜ ์ด๋ฆ„์ด ์ž‘์„ฑ๋˜๋ฉด push ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด push ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    docker push [image_name]
  • ์ •์ƒ์ ์œผ๋กœ push๊ฐ€ ๋˜๋ฉด UI์—์„œ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. check_image
  • push๋œ ์ด๋ฏธ์ง€๋Š” ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด pull ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    docker pulll [image_name]