๐Ÿณ3. ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰์‹œํ‚ฌ๋•Œ

ํ˜ฒยท2021๋…„ 4์›” 16์ผ
0

ํ•ด๋‹น ๋‚ด์šฉ์€ ๋”ฐ๋ผํ•˜๋ฉฐ ๋ฐฐ์šฐ๋Š” ๋„์ปค์™€ CIํ™˜๊ฒฝ ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ  ์ •๋ฆฌํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค ๋งํฌ

hello-world๋Š” ํ…Œ์ŠคํŠธ์šฉ ์ปจํ…Œ์ด๋„ˆ๋ผ๊ณ  ๋ณด๋ฉด ๋œ๋‹ค
hello-world ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰์‹œ์ผœ๋ณด๊ณ  ๊ทธ ํ๋ฆ„์„ ์‚ดํŽด๋ณด์ž

docker run hello-world

๋„์ปค๋Š” ํ•ญ์ƒ

  1. ๋„์ปค CLI์— ์ปค๋งจ๋“œ๋ฅผ ์ž…๋ ฅํ•œ๋‹ค
  2. ๋„์ปค ์„œ๋ฒ„ (=๋„์ปค ๋ฐ๋ชฌ)๊ฐ€ ๊ทธ ์ปค๋งจ๋“œ๋ฅผ ๋ฐ›์•„ ์ž‘์—… (์ด๋ฏธ์ง€ ์ƒ์„ฑ, ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰..) ์„ ํ•˜๊ฒŒ ๋œ๋‹ค

๊ธฐ์–ต์„ ํ•˜๊ณ  hello-world ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰์‹œ์ผœ๋ณด์ž.

  • cmd ์ฐฝ์— ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•œ๋‹ค
docker run hello-world

๐Ÿ˜ฅ๋งŒ์•ฝ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค๋ฉด ๊ด€๋ฆฌ์ž๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰์‹œํ‚ค์ž

docker: Error response from daemon: pull access denied for hello-world, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
  • ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋œ๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์˜จ๋‹ค
C:\WINDOWS\system32>docker run hello-world
Unable to find image 'hello-world:latest' locally

-> ์ด๋ฏธ์ง€๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์–ด! ์ „์— ์ด๋ฏธ์ง€๋ฅผ ํ•œ๋ฒˆ๋„ ๋ฐ›์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์—

latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
Status: Downloaded newer image for hello-world:latest

-> hello-world ์ด๋ฏธ์ง€๋ฅผ ๋ฐ›์•„์˜ด

Hello from Docker!
This message shows that your installation appears to be working correctly.

...

hello-world ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ณ  -> ์ด๋ฏธ์ง€๊ฐ€ ์—†๋‹ค๋Š” ๊ฒƒ์„ ํ™•์ธํ•˜๊ณ  -> hello-world ์ด๋ฏธ์ง€๋ฅผ ๋ฐ›์•„์™”์Œ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

๋„์ปค ์ปจํ…Œ์ด๋„ˆ์˜ ์‹คํ–‰๊ณผ์ •

docker run hello-world ๋ฅผ ์ž…๋ ฅํ–ˆ์„ ๋•Œ์˜ ์ƒํ™ฉ์„ ์ •๋ฆฌํ•ด๋ณด์ž

  • ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅ

  • hello-world ์ด๋ฏธ์ง€๊ฐ€ ์žˆ๋Š”์ง€ ์บ์‹œ ์ €์žฅ์†Œ์— ๋จผ์ € ์‚ดํŽด๋ณด๊ธฐ

    • ์—†์Œ -> Unable to find image ๊ฐ€ ๋œธ
  • ๋„์ปค ํ—ˆ๋ธŒ์—์„œ hello-world ์ด๋ฏธ์ง€๋ฅผ ๊ฐ€์ ธ์˜จ๋‹ค

    • ๋„์ปค ํ—ˆ๋ธŒ ์•ˆ์—๋Š” ๋‹ค์–‘ํ•œ ์ด๋ฏธ์ง€๋“ค์ด ์กด์žฌํ•œ๋‹ค
  • ์ด๋ฏธ์ง€๋ฅผ ๋‹ค์šด๋ฐ›์•„ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰์‹œํ‚จ๋‹ค

profile
๐Ÿ’ป๐Ÿ“๐Ÿคฏ

0๊ฐœ์˜ ๋Œ“๊ธ€