๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ป Programming/Docker & Kubernetes

[Docker] (2) ๋„์ปค & ๋„์ปค์ปดํฌ์ฆˆ ๋‹ค์šด๋กœ๋“œ

by ๋ญ…์ฆค 2023. 8. 20.
๋ฐ˜์‘ํ˜•
Docker ์ „์ฒด ํฌ์ŠคํŒ…
๋”๋ณด๊ธฐ

[Docker] (1) ๋„์ปค ๊ฐœ๋… ์„ค๋ช… | ๋„์ปค๋Š” ์™œ ์‚ฌ์šฉํ•˜๋Š” ๊ฑธ๊นŒ?

[Docker] (2) ๋„์ปค & ๋„์ปค์ปดํฌ์ฆˆ ๋‹ค์šด๋กœ๋“œ

[Docker] (3) ๋„์ปค ํ•ต์‹ฌ ๊ฐœ๋… - ์ด๋ฏธ์ง€, ์ปจํ…Œ์ด๋„ˆ, ๋„์ปค ํ—ˆ๋ธŒ

[Docker] (4) docker pull(์ด๋ฏธ์ง€ ๋‹ค์šด๋กœ๋“œ) & docker run(์ปจํ…Œ์ด๋„ˆ ์ƒ์„ฑ/์‹คํ–‰) & ํฌํŠธํฌ์›Œ๋”ฉ(ํฌํŠธ๋งคํ•‘)

[Docker] (5) ๋„์ปค run ๋ช…๋ น์–ด ์˜ต์…˜, ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์ข…๋ฃŒ๋˜์ง€ ์•Š๊ฒŒ ํ•˜๋Š” ๋ฐฉ๋ฒ•

[Docker] (6) ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋กœ ์ ‘์†ํ•˜๊ธฐ - docker exec & docker attach

[Docker] (7) ๋„์ปค volume(๋ณผ๋ฅจ) ์˜ต์…˜ - ์ปจํ…Œ์ด๋„ˆ ํด๋”์™€ ํ˜ธ์ŠคํŠธ ํด๋” ์—ฐ๊ฒฐํ•˜๊ธฐ

[Docker] (8) ๋„์ปค commit(์ปค๋ฐ‹) & push(ํ‘ธ์‹œ) - ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ƒˆ๋กœ์šด ๋„์ปค ์ด๋ฏธ์ง€๋กœ ์ €์žฅํ•˜๊ณ  ๋ ˆํผ์ง€ํ† ๋ฆฌ์— ์—…๋กœ๋“œ

[Docker] (9) Dockerfile(๋„์ปคํŒŒ์ผ) - ์Šค๋งˆํŠธํ•˜๊ฒŒ ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ๋นŒ๋“œํ•˜๋Š” ๋ฐฉ๋ฒ•

[Docker] (10) Dockerfile ๋นŒ๋“œ ์˜ˆ์‹œ | ENTRYPOINT ์™€ CMD์˜ ์ฐจ์ด

[Docker] (11) ๋„์ปค ์ปจํ…Œ์ด๋„ˆ์™€ vscode ์—ฐ๋™ํ•˜๊ธฐ | ๋„์ปค ์ปจํ…Œ์ด๋„ˆ์—์„œ ๊ฐœ๋ฐœ

[Docker] (12) ๊นƒํ—ˆ๋ธŒ๋กœ ๋„์ปค ์ด๋ฏธ์ง€ ๊ณต์œ ํ•˜๊ธฐ | Packages Container Registry

 

 

๊ตฌ๊ธ€์— 'docker ๋‹ค์šด๋กœ๋“œ' ๊ฒ€์ƒ‰

  • ๋„์ปค ํ™ˆํŽ˜์ด์ง€ ์ ‘์†

 

๋„์ปค ๋‹ค์šด๋กœ๋“œ

  • ๋„์ปค ํ™ˆํŽ˜์ด์ง€์—์„œ ์ ์ ˆํ•œ ํ•˜๋“œ์›จ์–ด ๋ฒ„์ „์˜ Docker Desktop ๋‹ค์šด๋กœ๋“œ
  • ๋‹ค์šด๋กœ๋“œํ•˜๋ฉด docker์™€ docker-compose๊ฐ€ ํ•จ๊ป˜ ๋‹ค์šด๋กœ๋“œ๋จ

 

๋‹ค์šด๋กœ๋“œ ํ™•์ธ

๋‹ค์šด๋กœ๋“œ๊ฐ€ ์™„๋ฃŒ๋˜๊ณ  ๋‚˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ๋ช…๋ น์–ด๋กœ docker์™€ docker-compose ์˜ ๋ฒ„์ „์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Œ

 

 

Docker Desktop

  • Docker Desktop์„ ์‹คํ–‰ํ•˜๊ณ  ๋กœ๊ทธ์ธํ•˜๋ฉด ๋ช…๋ น์ฐฝ์ด ์•„๋‹Œ GUI ํ”„๋กœ๊ทธ๋žจ์œผ๋กœ ๋„์ปค ํ™˜๊ฒฝ์„ ์ปจํŠธ๋กค ํ•  ์ˆ˜ ์žˆ์Œ
  • ์ปจํ…Œ์ด๋„ˆ, ์ด๋ฏธ์ง€ ๋“ฑ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ณ  ๊ฐ์ข… ์„ค์ • ๊ฐ€๋Šฅ
๋ฐ˜์‘ํ˜•