DevOps/Docker

Docker(๋„์ปค)๋ž€? Docker ๊ธฐ๋ณธ ๊ฐœ๋…

meeeeejin 2021. 3. 29. 23:06

๋ชฉ์ฐจ

  • Docker๋ž€?
  • VM(๊ฐ€์ƒ ๋จธ์‹ ) vs Docker
  • Image(์ด๋ฏธ์ง€)
  • Docker Architecture

Docker๋ž€?

  • ์ปจํ…Œ์ด๋„ˆ ๊ธฐ๋ฐ˜์˜ ์˜คํ”ˆ์†Œ์Šค ๊ฐ€์ƒํ™” ํ”Œ๋žซํผ
  • ์‚ฌ๋žŒ๋“ค์ด ์ผ๋ฐ˜์ ์œผ๋กœ ์ƒ๊ฐํ•˜๋Š” ํ™”๋ฌผ ์ˆ˜์†ก์šฉ ๋ฐ•์Šค(์ปจํ…Œ์ด๋„ˆ)์˜ ๊ฐœ๋…์„ SW์— ์ ์šฉ
  • ๋‹ค์–‘ํ•œ ํ”„๋กœ๊ทธ๋žจ, ์‹คํ–‰ํ™˜๊ฒฝ์„ ์ปจํ…Œ์ด๋„ˆ๋กœ ์ถ”์ƒํ™”ํ•˜์—ฌ ๋™์ผํ•œ ์ธํ„ฐํŽ˜์ด์Šค ์ œ๊ณต
  • ํ”„๋กœ๊ทธ๋žจ์˜ ๋ฐฐํฌ ๋ฐ ๊ด€๋ฆฌ๋ฅผ ๋‹จ์ˆœํ™”

์ถœ์ฒ˜: https://tech.osci.kr/2020/03/03/91690167/

 

 

 

 

VM(Virtual Machine) vs Docker

์ถœ์ฒ˜: https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html

VM Container
Host OS ์œ„์— Guest OS ์ „์ฒด๋ฅผ ๊ฐ€์ƒํ™” ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ฒฉ๋ฆฌ
๋ฉ”๋ชจ๋ฆฌ ๊ณผ๋„ ์ ์œ (OS ์ฝ”๋“œ ๋•Œ๋ฌธ์—) ํ›จ์”ฌ ์ ์€ ๋ฉ”๋ชจ๋ฆฌ ์ ์œ 
๋‹ค์ˆ˜ VM ์‹คํ–‰ํ•˜๋ฉด ๊ธ‰๊ฒฉํ•œ ์„ฑ๋Šฅ ์ €ํ•˜ container engine์„ ์‚ฌ์šฉํ•˜์—ฌ ์„ฑ๋Šฅ ์ €ํ•˜ ์ ์Œ
Scale up(์„ฑ๋Šฅ ํ–ฅ์ƒ) ์–ด๋ ค์›€ Scale up(์„ฑ๋Šฅ ํ–ฅ์ƒ) ์‰ฌ์›€
Portability(์ด์‹์„ฑ) ์ œํ•œ Platform์— ์ขŒ์šฐ๋˜์ง€ ์•Š์Œ
VM ์‚ฌ์ด์—์„œ Data volume ๊ณต์œ  ๋ถˆ๊ฐ€๋Šฅ Docker volume์„ ์—ฌ๋Ÿฌ container๋“ค์ด ๊ณต์œ 
ํšจ์œจ์ด ๋‚ฎ์Œ ํšจ์œจ์ด ๋†’์Œ

 

 

 

 

Image(์ด๋ฏธ์ง€)

์ถœ์ฒ˜: https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html

  • ์ด๋ฏธ์ง€๋Š” ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰์— ํ•„์š”ํ•œ ํŒŒ์ผ๊ณผ ์„ค์ •๊ฐ’๋“ค์„ ํฌํ•จ
  • ์ด๋ฏธ์ง€๋ฅผ ์‹คํ–‰ํ•œ ์ƒํƒœ(run)๊ฐ€ ์ปจํ…Œ์ด๋„ˆ
  • ์ด๋ฏธ์ง€๋Š” ๋ณ€ํ•˜์ง€ ์•Š์Œ(Immutable)
  • Docker Hub์—์„œ pull ํ•˜๊ฑฐ๋‚˜ Dockerfile์„ build ํ•˜์—ฌ ์ด๋ฏธ์ง€ ์ƒ์„ฑ

 

 

 

 

Docker Architecture

์ถœ์ฒ˜: https://thingsolver.com/hello-docker/

  • Docker Engine(=docker)๋Š” ์‚ฌ์šฉ์ž์˜ ์ปดํ“จํ„ฐ์— ์„ค์น˜ํ•˜์—ฌ ์ปจํ…Œ์ด๋„ˆ๋ฅผ build ํ•˜๊ณ  run ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด
  • Client - Server ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง
  • REST API(HTTP ํ”„๋กœํ† ์ฝœ๋กœ ๋‘ SW ์‚ฌ์—์ด์„œ ํ†ต์‹ ํ•˜๋„๋ก ์ œ๊ณต๋œ API) ์ด์šฉ
  • Docker Client๋Š” docker ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์ด๋Ÿฐ ๋ช…๋ น๋“ค์€ REST API๋ฅผ ํ†ตํ•ด Docker Daemon์— ์ „๋‹ฌ๋จ
  • Docker Daemon์€ ์ „๋‹ฌ๋ฐ›์€ ๋ช…๋ น์— ๋”ฐ๋ผ OS ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰

 

 

 

 

์ฐธ๊ณ 

 

 

 

 

728x90

'DevOps > Docker' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Docker ๊ธฐ๋ณธ ๋ช…๋ น์–ด, ์‚ฌ์šฉ๋ฒ•  (0) 2021.04.09