๐Ÿ› ๏ธ ๋งฅ๋ฏธ๋‹ˆ ์„œ๋ฒ„ ์šด์˜๊ธฐ: ์›๊ฒฉ ์žฌ๋ถ€ํŒ… ํ›„ Docker๋ฅผ ์‚ด๋ฆฌ๋‹ค

Docker Desktop ๋Œ€์‹  Colima๋กœ ํ•ด๊ฒฐํ•œ ์‹ค์ „ ์‚ฌ๋ก€


๐Ÿ–ฅ๏ธ ๋งฅ๋ฏธ๋‹ˆ๋ฅผ ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•˜๋ฉฐ ๋ฒŒ์–ด์ง„ ์ผ

์ตœ๊ทผ ๋งฅ๋ฏธ๋‹ˆ๋ฅผ ๊ฐœ์ธ ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. SSH๋ฅผ ํ†ตํ•ด ์›๊ฒฉ์œผ๋กœ ์ ‘์†ํ•ด Docker๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ…Œ์ŠคํŠธ๋‚˜ ๋ฐ์ดํ„ฐ ๋ถ„์„ ์ž‘์—…์„ ์ง„ํ–‰ํ–ˆ์ฃ .

ํ•˜์ง€๋งŒ ์–ด๋Š ๋‚ , ๋งฅ๋ฏธ๋‹ˆ์˜ ์‘๋‹ต์ด ๋Š๋ ค์กŒ์Šต๋‹ˆ๋‹ค. โ€œ์žฌ๋ถ€ํŒ…์ด ์ •๋‹ต์ด๊ฒ ์ง€?โ€๋ผ๋Š” ์ƒ๊ฐ์— SSH๋กœ ์ ‘์†ํ•ด ์žฌ๋ถ€ํŒ…์„ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค.

1
sudo reboot

์ž ์‹œ ๊ธฐ๋‹ค๋ฆฐ ๋’ค, ๋‹ค์‹œ SSH๋กœ ์—ฐ๊ฒฐ์€ ์ž˜ ๋˜์—ˆ๋Š”๋ฐโ€ฆ


๐Ÿšจ Docker ๋ฐ๋ชฌ ์‹คํ–‰ ์˜ค๋ฅ˜

Docker ์ƒํƒœ๋ฅผ ํ™•์ธํ•˜๋ ค๊ณ  docker ps ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ–ˆ์ง€๋งŒ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋–ด์Šต๋‹ˆ๋‹ค.

1
2
docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Docker ๋ฐ๋ชฌ์ด ์‹คํ–‰๋˜์ง€ ์•Š๋Š” ์ƒํ™ฉ!

์ด๋•Œ๋ถ€ํ„ฐ ์•…๋ชฝ์˜ ์‹œ์ž‘์ด์—ˆ์Šต๋‹ˆ๋‹ค.


๐Ÿšซ Docker Desktop ์‹คํ–‰ ์‹คํŒจ

ํ˜น์‹œ Docker Desktop์„ ์‹คํ–‰ํ•˜๋ฉด ํ•ด๊ฒฐ๋ ๊นŒ ์‹ถ์–ด open ๋ช…๋ น์„ ์‚ฌ์šฉํ–ˆ์ง€๋งŒ:

1
open /Applications/Docker.app

๊ฒฐ๊ณผ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์•˜์Šต๋‹ˆ๋‹ค.

1
Error Domain=RBSRequestErrorDomain Code=5 "Launch failed."

๐Ÿ™…โ€โ™‚๏ธ SSH ์›๊ฒฉ ํ™˜๊ฒฝ์—์„œ๋Š” Docker Desktop์ด ์‹คํ–‰๋˜์ง€ ์•Š๋Š”๋‹ค๋Š” ์ ์„ ๊นจ๋‹ฌ์•˜์Šต๋‹ˆ๋‹ค.


๐Ÿ› ๏ธ ํ•ด๊ฒฐ ์‹œ๋„: launchctl๋„ ์‹คํŒจ

โ€œ๊ทธ๋Ÿผ ์‹œ์Šคํ…œ ์„œ๋น„์Šค๋กœ Docker๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์–ด๋–จ๊นŒ?โ€

๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

1
sudo launchctl load -w /Library/LaunchDaemons/com.docker.docker.plist

๊ฒฐ๊ณผ๋Š” ๋˜ ์‹คํŒจ. ๐Ÿ˜“

1
2
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.

์—ฌ๊ธฐ๊นŒ์ง€ ์˜ค๋‹ˆ ๋งˆ์Œ์ด ์กฐ๊ธ‰ํ•ด์กŒ์Šต๋‹ˆ๋‹ค.


๐Ÿง  ChatGPT์™€ ํ•จ๊ป˜ ์ฐพ์€ ํ•ด๊ฒฐ์ฑ…: Colima

์ด์ œ๋Š” Docker Desktop์„ ํฌ๊ธฐํ•˜๊ณ  ๋Œ€์•ˆ์„ ์ฐพ๊ธฐ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋•Œ ChatGPT๊ฐ€ ์ œ์•ˆํ•œ ๋„๊ตฌ๋Š” ๋ฐ”๋กœ Colima์˜€์Šต๋‹ˆ๋‹ค.

Colima๋ž€?

Colima๋Š” macOS์—์„œ Docker๋ฅผ ๊ฐ€์ƒ ๋จธ์‹ ์„ ํ†ตํ•ด ๊ฐ€๋ณ๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.


๐Ÿ”ง Colima ์„ค์น˜ ๋ฐ ์‹œ์ž‘

1. Colima ์„ค์น˜

Homebrew๋ฅผ ํ†ตํ•ด Colima๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

1
brew install colima

2. Colima ์‹คํ–‰ ๋ฐ ์ƒํƒœ ํ™•์ธ

Colima๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์ƒํƒœ๋ฅผ ํ™•์ธํ•ด ๋ด…๋‹ˆ๋‹ค.

1
2
colima start
colima status

์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ƒํƒœ ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜ต๋‹ˆ๋‹ค:

1
2
3
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] runtime: docker
INFO[0000] socket: unix:///Users/macmini/.colima/default/docker.sock

๐Ÿงฉ Docker CLI์™€ Colima ์†Œ์ผ“ ์—ฐ๊ฒฐ

๋ฌธ์ œ๋Š” Docker CLI๊ฐ€ ๊ธฐ๋ณธ์ ์œผ๋กœ /var/run/docker.sock๋ฅผ ์ฐพ๊ธฐ ๋•Œ๋ฌธ์— Colima์˜ ์†Œ์ผ“๊ณผ ์—ฐ๊ฒฐํ•ด์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ๋ช…๋ น์œผ๋กœ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

1
export DOCKER_HOST=unix:///Users/macmini/.colima/default/docker.sock

๐ŸŽ‰ Docker ๋ฐ๋ชฌ ๋‹ค์‹œ ์‚ด์•„๋‚˜๋‹ค!

ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•œ ํ›„, docker ps ๋ช…๋ น์–ด๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

1
docker ps

๊ฒฐ๊ณผ๋Š” ์„ฑ๊ณต! ๐ŸŽ‰

1
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

๐Ÿ“‹ ์ „์ฒด ๊ณผ์ • ์ •๋ฆฌ

1. ๋ฌธ์ œ ์ƒํ™ฉ:

  • ์›๊ฒฉ SSH ํ™˜๊ฒฝ์—์„œ Docker Desktop ์‹คํ–‰ ์‹คํŒจ

  • launchctl๋กœ Docker ๋ฐ๋ชฌ ์‹œ์ž‘ ์‹คํŒจ

2. ํ•ด๊ฒฐ์ฑ…:

  • Colima๋ฅผ Homebrew๋กœ ์„ค์น˜

  • Colima ์‹œ์ž‘ ํ›„ ์†Œ์ผ“ ๊ฒฝ๋กœ ํ™•์ธ

  • DOCKER_HOST ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •

3. ์ตœ์ข… ์ฝ”๋“œ ์š”์•ฝ:

1
2
3
4
# Colima ์„ค์น˜ ๋ฐ ์‹œ์ž‘brew install colima
colima start
# Docker ์†Œ์ผ“ ์—ฐ๊ฒฐexport DOCKER_HOST=unix:///Users/macmini/.colima/default/docker.sock
# Docker ์ƒํƒœ ํ™•์ธdocker ps

๐Ÿง  ์™œ Colima์ธ๊ฐ€?

  • ๊ฒฝ๋Ÿ‰ํ™”๋œ VM์„ ์‚ฌ์šฉํ•ด Docker ๋ฐ๋ชฌ์„ ์‹คํ–‰
  • SSH ์›๊ฒฉ ํ™˜๊ฒฝ์—์„œ๋„ ๋ฌธ์ œ์—†์ด ์ž‘๋™
  • Docker Desktop๊ณผ ๋‹ฌ๋ฆฌ GUI๊ฐ€ ํ•„์š” ์—†์Œ

๐Ÿ’ก ๊ตํ›ˆ: ๋งฅ๋ฏธ๋‹ˆ ์„œ๋ฒ„ ์šด์˜ ํŒ

  1. Docker Desktop์˜ ํ•œ๊ณ„: SSH ํ™˜๊ฒฝ์—์„œ๋Š” GUI ๊ธฐ๋ฐ˜ ์•ฑ์„ ์‹คํ–‰ํ•˜๊ธฐ ์–ด๋ ต๋‹ค.
  2. Colima ํ™œ์šฉ: ์›๊ฒฉ ํ™˜๊ฒฝ์—์„œ Docker๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฐ•๋ ฅํ•œ ๋Œ€์•ˆ.
  3. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •: Docker CLI ์†Œ์ผ“์„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒƒ์ด ํ•ต์‹ฌ์ด๋‹ค.

๐Ÿš€ ๊ฒฐ๋ก : ์›๊ฒฉ ๋งฅ๋ฏธ๋‹ˆ ์šด์˜, ์ด์ œ ๋ฌธ์ œ์—†๋‹ค!

์ด๋ฒˆ ๊ฒฝํ—˜์„ ํ†ตํ•ด ์›๊ฒฉ ํ™˜๊ฒฝ์—์„œ Docker ๋ฐ๋ชฌ์„ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ฐฐ์› ์Šต๋‹ˆ๋‹ค.

Docker Desktop ๋Œ€์‹  Colima๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐ€๋ณ๊ณ  ๋น ๋ฅด๊ฒŒ ์„œ๋ฒ„๋ฅผ ์šด์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ˜น์‹œ ๋น„์Šทํ•œ ๋ฌธ์ œ๋ฅผ ๊ฒช๋Š” ๋ถ„์ด ์žˆ๋‹ค๋ฉด ์ด ๊ธ€์ด ๋„์›€์ด ๋˜๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.

์›๊ฒฉ ์žฌ๋ถ€ํŒ… ํ›„ Docker ์˜ค๋ฅ˜๋ฅผ ๊ทน๋ณตํ•œ ์ œ ๊ฒฝํ—˜์ด ์ž‘์€ ํ•ด๊ฒฐ์ฑ…์ด ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ๋„ค์š”! ๐Ÿ˜Š


์ฝ์–ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

๊ถ๊ธˆํ•œ ์ ์ด๋‚˜ ๋” ๋‚˜์€ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€๋กœ ์•Œ๋ ค์ฃผ์„ธ์š”! ๐Ÿš€