VSCode DevContainer - CI/CD ์คํฐ๋ 1์ฃผ์ฐจ
- kkumtree
2025-10-19T20:50:46+09:00
ํ๊ฐ์ ์ฐํด์ ๋๊ณผ ํจ๊ป, CloudNet@์์ ์งํํ๊ณ ์๋ CI/CD Study์ ์ฐธ์ฌํ๊ฒ ๋์์ต๋๋ค.
์ด๋ฒ์๋ ํธ์ฆ์จ์ฉ์ผ๋ก ์ฆ๊ฒจ์ฐ๋ GitHub CodeSpace์ ์ฐ๊ด๋,
Visual Studio ์์์์ Dev Containers ํ์ฉ์ ๋ํด ๋ค๋ค๋ณด๊ณ ์ ํฉ๋๋ค.
์ฌ์ฉ OSํ๊ฒฝ์ Ubuntu Desktop 24.04 LTS ์ด๋ฉฐ,
์๋์ ๋ฌธ์์์ ์๋ด๋๋๋ก ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐ๋ผํด๋ณด๋ฉฐ ์ข ๋ ์ดํด๋ฅผ ํด๋ณด๊ณ ์ ํฉ๋๋ค.
0. Docker ์ค์น
๋ด์ฉ์ด ๊ธธ์ด, ์๋์ ํฌ์คํธ๋ก ๋๋์์ต๋๋ค.
- Ubuntu Docker ์ค์น
- ์์ฑ ๊ธฐ์ค, Dev Container๋ Ubuntu Snap ํจํค์ง(snapcraft)๋ก ์ค์น๋ Docker์๋ ์ง์๋์ง ์๋๋ค๊ณ ํฉ๋๋ค.
- ์ฌ์ฉ์(
$USER)๋ฅผdocker๊ทธ๋ฃน์ ์ถ๊ฐํ์ฌ์ผํฉ๋๋ค.
(์ ๊ฒ์๋ฌผ์3. ๊ถํ ์์น ์ค์ (์ ํ)์ฐธ๊ณ )
1. Dev Containers ํ์ฅ ํ๋ก๊ทธ๋จ
Visual Studio Code(์ดํ, VSCode)์์ ์ ๊ณต๋๋, Dev Containers ํ์ฅ ํ๋ก๊ทธ๋จ์ ์ฌ์ฉํ๋ฉด, ๊ฐ๋ฐ ํ๊ฒฝ์ ํ์ํ ๋ชจ๋ ๊ธฐ๋ฅ์ด ๊ฐ์ถฐ์ง Container๋ฅผ ๊ตฌ์ถํ์ฌ ํ๊ฒฝ์ ๊ตฌ์ฑํ ์ ์์ต๋๋ค.
Ubuntu Docker ์ค์น
- kkumtree
2025-10-17T20:53:27+09:00
Docker ์ฌ์ฉ์ ์ํ ๊ธฐ๋ณธ์ ์ธ ์ค์น ๋ฐฉ๋ฒ ๋ฉ๋ชจ
0. ์ด์ ๋ฒ์ ์ ๊ฑฐ (์ ํ)
- ์งํ ์ค์ธ Docker ๊ด๋ จ ์์ ์ด ์์ด, prune ๋ช ๋ น์ด๋ฅผ ํตํด ๊ธฐ์กด Docker์ ๋ฆฌ์์ค๋ค์ ์ญ์ ์งํํ์์ต๋๋ค.
docker system prune -a

- ๊ณต์ ๋ฌธ์์ ๋ฐ๋ผ, ์๋ ์ปค๋งจ๋๋ก ์ญ์ ๋ฅผ ์งํํฉ๋๋ค.
(๊ฒธ์ฌ๊ฒธ์ฌ
autoremove๋ ์งํํฉ๋๋ค.)
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get autoremove
# โฏ for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
# [sudo] password for kkumtree:
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages were automatically installed and are no longer required:
# bridge-utils containerd pigz runc ubuntu-fan
# Use 'sudo apt autoremove' to remove them.
# The following packages will be REMOVED:
# docker.io
# 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
# After this operation, 126 MB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465886 files and directories currently installed.)
# Removing docker.io (27.5.1-0ubuntu3~24.04.2) ...
# '/usr/share/docker.io/contrib/nuke-graph-directory.sh' -> '/var/lib/docker/nuke-graph-directory.sh'
# Stopping 'docker.service', but its triggering units are still active:
# docker.socket
# Processing triggers for man-db (2.12.0-4build2) ...
# (...)
# Removing containerd (1.7.28-0ubuntu1~24.04.1) ...
# Processing triggers for man-db (2.12.0-4build2) ...
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages were automatically installed and are no longer required:
# bridge-utils pigz ubuntu-fan
# Use 'sudo apt autoremove' to remove them.
# The following packages will be REMOVED:
# runc
# 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
# After this operation, 34.3 MB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465640 files and directories currently installed.)
# Removing runc (1.3.0-0ubuntu2~24.04.1) ...
# Processing triggers for man-db (2.12.0-4build2) ...
# โฏ sudo apt-get autoremove
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages will be REMOVED:
# bridge-utils pigz ubuntu-fan
# 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
# After this operation, 421 kB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465612 files and directories currently installed.)
# Removing ubuntu-fan (0.12.16+24.04.1) ...
# ubuntu-fan: removing default /etc/network/fan configuration
# Removing bridge-utils (1.7.1-1ubuntu2) ...
# Removing pigz (2.8-1) ...
# Processing triggers for man-db (2.12.0-4build2) ...
1. Docker ๊ณต์ GPG key์ APT ๋ ํฌ์งํ ๋ฆฌ ์ถ๊ฐ
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Jenkins ์ปจํ ์ด๋์์ Host์ Docker ๋ฐ๋ชฌ ์ฌ์ฉํ๊ธฐ
- kkumtree
2024-09-01T09:02:15+09:00
์ต๊ทผ CloudNet@์์ ์งํํ๊ณ ์๋ K8s Advanced Network Study(์ดํ, KANS)์ ์ฐธ์ฌํ๊ฒ ๋์์ต๋๋ค.
๋์ด๋๋ฅผ ์๊ฐํ๋ฉด KH(Hardcore)NS๊ฐ ๋ ๋ง์๋ณด์ด์ง๋ง…
k8s๊ฐ ์๋ ์ธ๊ธฐ๊ฐ ๋ง๊ธฐ๋ ํ์ง๋ง, Pod ๊ฐ ํต์ ์๋ ๋ง์ ์ง์์ด ํฌ์ฌ๋๊ธฐ์ ์ด๋ฒ ๊ธฐํ์ ์ดํด๋ณด๊ธฐ๋ก ํ์ต๋๋ค.

์ฒซ ์ฃผ์ฐจ๋, ๋ฐ๋ก Kubernetes์ ์ง์
ํ์ง ์๊ณ Containerization์ ๋ํ ์ดํด๋ฅผ ๋จผ์ ๋ค๋ค์ฃผ์
จ์ต๋๋ค.
์ฌํ ์ฟ ๋ฒ๋คํฐ์ค ๊ฐ์์ ๋ฌ๋ฆฌ 9์ฃผ ๊ฐ ๋งค์ฃผ ์ผ์์ผ์๋ง ์งํ๋๋ ์ธ์
์ธ๋ฐ๋, ๊ธฐ๋ฐ ๊ธฐ์ ์ ๋ค์ ์ง์ด์ฃผ์
์ ๊ฐ์ฌํ์ต๋๋ค.
1. AWS EC2 Instance ์ ์
CloudFormation์ ํตํด, EC2 ๋ฐ ์ ๋ฐ์ฌํญ์ ๊ตฌ์ฑํ์ฌ ์ฃผ์
จ์ต๋๋ค๋ง, ์ทจ๋ฏธ ์ผ์ Terraform ๋ณํ ์์
์ ํด๋ณด์์ต๋๋ค. ํ์ง ๋ง์์ด์ผํ๋๋ฐ… LoL