ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

์ œ๋ชฉ์ด ์ข€ ๊ตฌ๊ตฌ์ ˆ์ ˆํ•˜๋‹ค

 

docker๋ฅผ mac os(os x)์—์„œ ์‹คํ–‰์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ•์€ ๋‘๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค

1. docker tool box๋ฅผ ์ด์šฉ

    - ๋ฆฌ๋ˆ…์Šค ๊ฐ€์ƒ ๋จธ์‹ ์„ ์ƒ์„ฑํ•œ ๋’ค ๋„์ปค๋ฅผ ์„ค์น˜

    - virtual box > ๋ฆฌ๋ˆ…์Šค ๊ฐ€์ƒ ๋จธ์‹  > ๋„์ปค ์ปจํ…Œ์ด๋„ˆ

2. docker for mac์„ ์ด์šฉ

    - ์ž์ฒด ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ๋กœ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์„ ๋งŒ๋“ค์–ด ์ปจํ…Œ์ด๋„ˆ ์ƒ์„ฑ

    - ๊ฐ€์ƒํ™˜๊ฒฝ์„ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด linuxkit์ด๋ผ๋Š” ํˆด์„ ์ด์šฉ

 

 

linuxkit์€ ์ฒ˜์Œ ๋“ค์–ด๋ณด์•˜๋Š”๋ฐ ๋ญ”์ง€ ๊ถ๊ธˆํ•ด์„œ ์ฐพ์•„๋ณด์•˜๋‹ค

- linuxkit: a secure linux subsystem

    - ๋งŽ์€ docker๋ฅผ ํ•„์š”ํ•œ ํ™˜๊ฒฝ๋“ค์ด linux subsystem์„ ์ œ๊ณตํ•˜์ง€ ์•Š๊ณ  ์žˆ์Œ

    - docker๋Š” ๋ชจ๋“ˆ์‹์ด๊ณ , ์•ˆ์ „ํ•˜๊ณ , ๊ฐ„๊ฒฐํ•˜๊ณ , ์ด์‹๊ฐ€๋Šฅํ•œ(portalbe) linux subsystem์„ ์›ํ–ˆ์Œ

    - docker๋Š” ๋‹ค์–‘ํ•œ ํ”Œ๋žซํผ์— linux subsystem์„ ๊ตฌ์ถ•ํ•˜๊ธฐ ์œ„ํ•ด ๊ฐœ๋ฐœํ•œ kit์„ ์˜คํ”ˆ์†Œ์Šค๋กœ ๊บผ๋‚ธ๊ฒŒ linuxkit

    - linuxkit์˜ ๊ธฐ๋ณธ ์•„์ด๋””์–ด๋Š” ์ตœ์†Œํ•œ์˜ linux kernel๋กœ ์‹œ์ž‘ํ•ด์„œ ํ•„์š”ํ•œ ๊ฒƒ๋งŒ์„ ์ถ”๊ฐ€ํ•ด์„œ ์‚ฌ์šฉ,,

    - ์ง€์› ํ”Œ๋žซํผ : HyperKit(macOS), Hyper-V(Windows),,,๋“ฑ๋“ฑ

 

=> docker๋Š” linux ๊ธฐ๋ฐ˜์—์„œ ์‹คํ–‰๋˜์ง€๋งŒ ๊ทธ๊ฒŒ ์•ˆ๋˜๋Š” os๋“ค์—์„œ docker ์‹คํ–‰์„ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ์ž‘๊ณ  ๊ฐ€๋ฒผ์šด linux kernel,,,์ •๋„๋กœ ์ดํ•ดํ–ˆ๋‹ค

(์ฐธ๊ณ ๋กœ github์—๋Š” A toolkit for building secure, portable and lean operating systems for containers๋ผ๊ณ  ๋˜์–ด์žˆ๋‹น)

 

 

์ฐพ๋‹ค๋ณด๋‹ˆ moby project์— ๋Œ€ํ•ด์„œ๋„ ์•Œ๊ฒŒ๋˜์—ˆ๋‹ค

- moby project : specialized container system๋“ค์„ ์กฐ๋ฆฝํ•˜๋Š” ํ”„๋ ˆ์ž„์›Œํฌ

    - ๊ตฌ์„ฑ

        - ์ปจํ…Œ์ด๋„ˆํ™” ๋œ ๋ฐฑ์—”๋“œ ๊ตฌ์„ฑ ์š”์†Œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

        - component๋“ค์„ ๋…๋ฆฝํ˜• container platfor์œผ๋กœ ์กฐ๋ฆฝํ•˜๊ณ , ์ด ์กฐํ•ฉ๋œ artifact๋“ค์„ build, test, deployํ•˜๊ธฐ ์œ„ํ•œ framework

    - ์ž์ฒด container ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•˜๊ณ ์ž ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ๊ฒƒ

- moby๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฐฐํฌ ์ด๋ฏธ์ง€๋ฅผ ๋นŒ๋“œํ•˜๊ณ  linuxkit ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์‹คํ–‰,,

 

ํ•˜๋ฉด์„œ xhyve์— ๋Œ€ํ•ด์„œ๋„ ์กฐ๊ธˆ ์ฐพ์•„๋ณด์•˜๋‹ค

- xhyve : os x์˜ Hyphervixor.framework์—์„œ ์‹คํ–‰๋˜๋Š” ๊ฐ€์ƒ ๋จธ์‹  ์šด์˜์ฒด์ œ

    - bhyve์˜ os x๋กœ์˜ port(์ฝ”๋“œ๋Š” ์œ ์‚ฌํ•œ๋ฐ ๊ตฌ์กฐ๊ฐ€ ๋‹ค๋ฆ„, github ์ฐธ๊ณ )

        - bhyve๋Š” type2 hypervisor

        - bhyve๋Š” ๋‹จ์ˆœ์„ฑ์— ์ค‘์ ์„ ๋‘” FreeBSD hypervisor์ด๋‹ค(linux์˜ KVM + QEMU์™€ ์œ ์‚ฌ)

            (FreeBSD๋Š” BSD๊ณ„์—ด ์˜คํ”ˆ์†Œ์Šค ์šด์˜์ฒด์ œ์ด๊ณ , BSD๋Š” ์œ ๋‹‰์Šค ์šด์˜์ฒด์ œ ์ชฝ์ด๋‹ค(์ฐธ๊ณ ))

    - docker for mac์ด ๋‚ด๋ถ€์ ์œผ๋กœ ์‚ฌ์šฉํ•œ๋‹ค,,

 

- hyperkit

    - application์— hypervisor ๊ธฐ๋Šฅ์„ ํฌํ•จํ•˜๊ธฐ ์œ„ํ•œ toolkit

    - xhyve, bhyve ๊ธฐ๋ฐ˜์˜ ์™„์ „ํ•œ hypervisor๊ฐ€ ํฌํ•จ๋จ

    - xhyve์—์„œ ํŒŒ์ƒ๋˜์–ด์„œ ํ™•์žฅ

    

 

๋‚˜์ค‘์— ์ด ๊ธ€์„ ๋”ฐ๋ผํ•ด๋ณด๋Š” ๊ฒƒ๋„ ์ข‹์„๊ฒƒ ๊ฐ™๋‹ค linuxkit ์ง์ ‘ ์‹คํ–‰ํ•ด๋ณด๊ธฐ!

 

- ๋‚˜๋ฆ„๋Œ€๋กœ ์ •๋ฆฌํ•ด๋ณธ ๊ฒฐ๋ก 

docker๊ฐ€ virtual machine๊ณผ์˜ ๋‹ค๋ฅธ ์ ์ด host os๋ฅผ ๊ณต์œ ํ•œ container๋ฅผ ์‹คํ–‰์‹œํ‚จ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค

(๊ฐ€์ƒํ™”๋œ ๊ณต๊ฐ„ ์ƒ์„ฑ์— linux ์ž์ฒด ๊ธฐ๋Šฅ์ธ chroot, namespace, cgroup ์‚ฌ์šฉ, hypervisor๊ฐ€ ์•„๋‹Œ docker engine์ด ๋™์ž‘)

์—ฌ๊ธฐ์„œ ๋ฌธ์ œ๊ฐ€ >>>host os<<<๊ฐ€ linux์—ฌ์•ผ ํ•œ๋‹ค,,,๋Š” ๊ฒƒ์ด ์žˆ๋‹ค

docker๋ฅผ linux์—์„œ ์‹คํ–‰ํ•  ๋•Œ๋Š” ๋ณ„ ์ด์Šˆ๊ฐ€ ์—†๋Š”๋ฐ linux ๊ณ„์—ด์ด ์•„๋‹Œ! os์—์„œ ์‹คํ–‰ํ•  ๋•Œ ์—ฌ๋Ÿฌ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒƒ์ด๋‹ค

๊ทธ๋ž˜์„œ linux๊ฐ€ ์•„๋‹Œ os์—์„œ docker ์‹คํ–‰์„ ์œ„ํ•ด์„œ๋Š” linux ๊ฐ€์ƒ ๋จธ์‹ ์„ ํ•˜๋‚˜ ๋„์šฐ๊ณ  ๊ฑฐ๊ธฐ์— ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋„์šฐ๋Š” ๋ฐฉ๋ฒ•1์ด ์žˆ๋‹ค

๋ฐฉ๋ฒ•1์€ container ์ ‘์†์„ ์œ„ํ•ด host os์™€ linux ๊ฐ€์ƒ ๋จธ์‹  ํฌํŠธ ํฌ์›Œ๋”ฉ, ๊ฐ€์ƒ ๋จธ์‹ ๊ณผ ์ปจํ…Œ์ด๋„ˆ ์‚ฌ์ด์˜ ํฌํŠธ ํฌ์›Œ๋”ฉ์ด ํ•„์š”ํ•˜์—ฌ ์ข€ ๋ณต์žกํ•˜๋‹ค

docker๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•1์™ธ์— ์ž์ฒด ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ๋กœ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•2๊ฐ€ ์žˆ๋‹ค

os x๋Š” HyperKit๋ฅผ ์ด์šฉํ•ด์„œ linux ํ™˜๊ฒฝ์„ ๋งŒ๋“œ๋Š”๋ฐ bhyver๊ฐ€ type2๋ผ๋Š” ๊ฑธ ๋ณด๋‹ˆ HyperKit๋„ type2์ธ๊ฑฐ ๊ฐ™๋‹ค(bhyve->xhyve->hyperkit)

windows10์€ hyper-v๋ฅผ ์ด์šฉํ•˜๋Š”๋ฐ ์ด๊ฑด type1์ด๋‹ค

๊ณ ๋กœ ๋ฐฉ๋ฒ• 2๋กœ ๋„์ปค ์‹คํ–‰์‹œ windows10์ด os x๋ณด๋‹ค ํ•˜๋“œ์›จ์–ด~๋„์ปค ์ปจํ…Œ์ด๋„ˆ ์‚ฌ์ด์— layer๊ฐ€ 1๊ฐœ ์ ์€ ๋“ฏํ•˜๋‹ค

์–ด์ฐŒ๋๋“  ๋‘˜ ๋‹ค ์•„๋ฌด๊ฒƒ๋„ ์—†์ด๋Š” docker๋ฅผ ๋ชป ๋Œ๋ฆฌ๊ณ  linuxํ™˜๊ฒฝ์ด ์กฐ์„ฑ๋˜์•ผ ๋˜์„œ ์—ญ์‹œ ์ œ์ผ ์ข‹์€๊ฑด linux์—์„œ ๋ฐ”๋กœ docker ๋Œ๋ฆฌ๋Š” ๊ฒƒ์ด๋‹น

๊ทผ๋ฐ local์—์„œ ๊ฐ€๋ณ๊ฒŒ ํ…Œ์ŠคํŠธ๋‚˜ ๊ณต๋ถ€๋งŒ ํ•  ๋ชฉ์ ์ด๋ฉด ๋ณ„ ์ƒ๊ด€ ์—†๋Š”๋“ฏ!

 

 

์ด๋ฒˆ์— ์ƒˆ๋กœ๋‚˜์˜จ m1 ๋งฅ๋ถ์ด docker๊ฐ€ ์‹คํ–‰ ์•ˆ๋œ๋‹ค๋Š” ์ด์Šˆ๊ฐ€ ์žˆ๋‹ค๋Š”๋ฐ(๋งํฌ)

๊ธฐ์กด์˜ ๋งฅ๋ถ์— ๋“ค์–ด์žˆ๋Š” ์ธํ…”์นฉ์€ ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ์„ ์ง€์›ํ•˜๋Š”๋ฐ m1์€ arm์ด๊ณ ,,,

์ธํ…”์ด๋“  m1์ด๋“  hypervisor๋ฅผ ์ง€์›ํ•˜์ง€๋งŒ ๋Œ๋ฆฌ๋Š” ๋ฐฉ์‹ arm์—์„œ ์ง€์›ํ•˜๋Š” ๊ฐ€์ƒํ™”๊ฐ€ ์ข€ ๋‹ฌ๋ผ์„œ ์•ˆ๋œ๋‹ค๋Š”๊ฒƒ ๊ฐ™๋‹ค(์ฐธ๊ณ )

 

 

๊ถ๊ธˆํ•ด์ ธ์„œ ์ƒˆ๋ฒฝ์— ์ด๊ฒƒ์ €๊ฒƒ ์ฐพ์•„๋ดค๋Š”๋ฐ ๋„˜๋‚˜ ์–ด๋ ต๋‹คใ… .ใ… 

 

 

 

 

 

- linuxkit github : github.com/linuxkit/linuxkit

- xhyve github : github.com/machyve/xhyve

- hyperkit github : github.com/moby/hyperkit

- ์ถœ์ฒ˜ 1 : www.cio.com/article/3190937/what-is-linuxkit-and-why-does-it-matter.html

- ์ถœ์ฒ˜ 2 : www.mirantis.com/blog/ok-i-give-up-is-docker-now-moby-and-what-is-linuxkit/

- ์ถœ์ฒ˜ 3 : www.docker.com/blog/introducing-the-moby-project/

- ์ถœ์ฒ˜ 4 : [์ฑ…] ์‹œ์ž‘ํ•˜์„ธ์š”!๋„์ปค/์ฟ ๋ฒ„๋„คํ‹ฐ์Šค

 -์ถœ์ฒ˜ 5 : medium.com/@hintcnuie/the-difference-between-xhyve-and-hyperkit-67a9f378ab97

- ์ฝ์–ด๋ณด๋ฉด ์ข‹์€ ๊ธ€ : renuevo.github.io/docker/docker-structure-windows10/

 

 

* ๋” ์•Œ์•„๋ณผ ๊ฒƒ

- KVM

- QEMU

- KEXT

๋ฐ˜์‘ํ˜•
๋Œ“๊ธ€
๋ฐ˜์‘ํ˜•
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2025/01   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ