๊ด€๋ฆฌ ๋ฉ”๋‰ด

Coding Planet

[Docker Swarm - 2] ubuntu์— Docker ์„ค์น˜ํ•˜๊ธฐ ๋ณธ๋ฌธ

๐Ÿ›ณ๏ธ Docker

[Docker Swarm - 2] ubuntu์— Docker ์„ค์น˜ํ•˜๊ธฐ

jhj.sharon 2024. 3. 8. 10:45
๋ฐ˜์‘ํ˜•

 

 

์ด์ „ ํฌ์ŠคํŠธ์—์„œ ์„ค์น˜ํ–ˆ๋˜ workerNode์— Docker์„ ์„ค์น˜ํ•˜๊ณ ์žํ•œ๋‹ค.

ํ„ฐ๋ฏธ๋„์„ ์—ด๊ณ  ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์— ๋„์ปค๋ฅผ ์„ค์น˜ํ•˜๋Š” ๋ช…๋ ์–ด๋ฅผ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ผ๊ฐ€๋ฉด ๋œ๋‹ค.

๋„์ปค ์„ค์น˜์‹œ ๊ณ„์ •์ƒ์„ฑ์‹œ ์„ค์ •ํ•œ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ•„์š”ํ•˜๋‹ค. ๊ณผ์ • ์ค‘ ๋””์Šคํฌ ์‚ฌ์šฉ์— ๋Œ€ํ•œ ํ—ˆ๊ฐ€์š”์ฒญ์—๋Š” ๋ชจ๋‘ Y๋กœ ํ•˜๋ฉด ๋œ๋‹ค.

 

 

์‹คํ–‰ํ™˜๊ฒฝ : Ubuntu 22.04.3 LTS

 

1. ์šฐ๋ถ„ํˆฌ ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์—…๋ฐ์ดํŠธ

sudo apt-get update

 

2. ํ•„์š”ํ•œ ํŒจํ‚ค์ง€ ์„ค์น˜

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

 

3. Docker์˜ ๊ณต์‹ GPGํ‚ค๋ฅผ ์ถ”๊ฐ€

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 

4. Docker์˜ ๊ณต์‹ apt ์ €์žฅ์†Œ๋ฅผ ์ถ”๊ฐ€

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

 

5. ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์—…๋ฐ์ดํŠธ

sudo apt-get update

 

6. Docker ์„ค์น˜

sudo apt-get install docker-ce docker-ce-cli containerd.io

 

7. Docker๊ฐ€ ์„ค์น˜ ํ™•์ธ

 

7-1 ๋„์ปค ์‹คํ–‰์ƒํƒœ ํ™•์ธ

sudo systemctl status docker

 

7-2 ๋„์ปค ์‹คํ–‰

sudo docker run hello-world

 

 

์ถœ์ฒ˜ : https://velog.io/@osk3856/Docker-Ubuntu-22.04-Docker-Installation

๋ฐ˜์‘ํ˜•
Comments