Ubuntu

Ubuntu Docker ์„ค์น˜

  • kkumtree

2025-10-17T20:53:27+09:00

Docker ์‚ฌ์šฉ์„ ์œ„ํ•œ ๊ธฐ๋ณธ์ ์ธ ์„ค์น˜ ๋ฐฉ๋ฒ• ๋ฉ”๋ชจ

0. ์ด์ „ ๋ฒ„์ „ ์ œ๊ฑฐ (์„ ํƒ)

  • ์ง„ํ–‰ ์ค‘์ธ Docker ๊ด€๋ จ ์ž‘์—…์ด ์—†์–ด, prune ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๊ธฐ์กด Docker์˜ ๋ฆฌ์†Œ์Šค๋“ค์„ ์‚ญ์ œ ์ง„ํ–‰ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
docker system prune -a

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

alt text

How to manage Microsoft packages with APT manager

  • kkumtree

2025-03-02T22:31:49+09:00

Microsoft gave us a lot of programs as Ubuntu/Debian packages.

In this post, I will show you how to manage Edge and VSCode packages with APT package manager.

APT is stands for Advanced Package Tool.

Why?

Simple. I want to upgrade them easily with APT package manager rather than using dpkg command.

sudo apt-get update -y && sudo apt-get upgrade -y  

When I installed Microsoft Edge and Visual Studio Code, I used dpkg command. But, It is little burdensome to manage packages with dpkg command in Update/Upgrade.

The following signatures were invalid: EXPKEYSIG

  • kkumtree

2024-11-04T21:24:49+09:00

๋งค๋ฒˆ ์ˆ˜์ •ํ•˜๊ธฐ ๊ท€์ฐฎ์•„์„œ, ๋‚˜์ค‘์— ์ฐพ์•„์„œ ์“ฐ๋ ค๊ณ  ๋„์ ์ด๋Š” ๋ฉ”๋ชจ
๋ณดํ†ต GPGํ‚ค ์ง€์šฐ๊ณ  ๋‹ค์‹œ ๋ฐ›์œผ๋ฉด ๋œ๋‹ค.

๊ทธ๋Ÿฐ ๋‚ ์ด ์žˆ๋‹ค. ๋ฌด์‹ฌ๊ฒฐ์— sudo apt-get update๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์ˆœ๊ฐ„, ์—๋Ÿฌ๊ฐ€ ๋œจ๋Š” ๋‚ .

expkeysig

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.31/deb  InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project <isv:[email protected]>
W: Failed to fetch https://pkgs.k8s.io/core:/stable:/v1.31/deb/InRelease  The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project <isv:[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

Zorin OS๋กœ ์ฒ˜์Œ ์ž…๋ฌธํ•  ๋•Œ๋Š” ์ด๊ฑฐ ๋งˆ์ฃผ์น˜๋ฉด ๋ฒ„ํ‹ฐ๋‹ค ๋ฒ„ํ‹ฐ๋‹ค ํฌ๋งทํ–ˆ๋Š”๋ฐ, ์ด์ œ๋Š” ๋ญ… ์–ด๋””์„œ ํ‚ค ๋งŒ๋ฃŒ๋๋‚˜๋ณด๋‹ค ํ•˜๊ณ  ๊ทธ๋ ค๋ ค๋‹ˆ ํ•œ๋‹ค. =ใ……=);

Terraform ์‹œ์ž‘ํ•˜๊ธฐ w/Minimal Ubuntu

  • kkumtree

2023-08-31T22:21:08+09:00

์ด๋ฒˆ์—๋Š” CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๋Š” Terraform ์Šคํ„ฐ๋””(์ดํ•˜, T101)์— ์ฐธ์—ฌํ–ˆ์Šต๋‹ˆ๋‹ค.

Terraform์„ ์“ฐ๋ฉด ์™œ ์ข‹์€์ง€๋Š” ์ž์„ธํ•˜๊ณ  ์ „๋ฌธ์ ์ธ ๊ธ€์ด ์žˆ์œผ๋ฏ€๋กœ, ์ฐธ๊ณ ํ•˜์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. (๋งํฌ: 44bits)

์˜ˆ์ „์— ํ…Œ๋ผํผ์„ ์ผ๋˜ ์ ์ด ์žˆ์ง€๋งŒ, Moduleํ™”๊ฐ€ ์–ด๋ ต๊ธฐ๋„ ํ•˜๊ณ 
์ด๋ฒˆ ๊ธฐํšŒ์— ํ…Œ๋ผํผ ์‹ ๊ฐ„์„ ๋‹ค์‹œ ๋ณต๊ธฐํ•˜๋Š” ๋งˆ์Œ์œผ๋กœ ์ฐธ์—ฌํ–ˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉํ•œ ๊ต์žฌ๋Š” [ํ…Œ๋ผํผ์œผ๋กœ ์‹œ์ž‘ํ•˜๋Š” IaC] ์ž…๋‹ˆ๋‹ค.

์ด๋ฒˆ์—๋Š” Terraform ์ดˆ๊ธฐ ์…‹์—…์— ๋Œ€ํ•ด, ์‚ดํŽด๋ณด๊ณ 
์‹œํ—˜์‚ผ์•„ Canonical ๊ณต์‹ Minimal Ubuntu(ARM64) AMI๋ฅผ ์„ค์น˜ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

  • Terraform ์„ค์น˜
  • tfenv ์‚ฌ์šฉ๊ณผ .tf ์ž‘์„ฑ ๋”ฐ๋ผํ•˜๊ธฐ
  • Hello World in terraform
  • Terraform ์จ๋ณด๊ธฐ

์ˆœ์œผ๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

Terraform ์„ค์น˜

Terraform์€ Linux ํ™˜๊ฒฝ(Ubuntu ๊ธฐ์ค€)์—์„œ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด 3๊ฐ€์ง€ ์ •๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
์ตœ์‹ ๋‚ด์šฉ์€ Terraform CLI์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Release file for URL is not valid yet ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

  • kkumtree

2023-06-29T02:28:34+09:00

์ตœ๊ทผ WSL๋ฅผ ์“ฐ๊ฒŒ ๋˜๋ฉด์„œ, ํ•œ ๊ฐ€์ง€ ์ด์Šˆ๊ฐ€ ์ƒ๊ฒผ๋‹ค.
APT repo๋ฅผ ์—…๋ฐ์ดํŠธ ํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.
์ด๊ฒƒ์ €๊ฒƒ ์†๋Œ€๋ณด๊ณ  ํ•ด๊ฒฐ๋ฒ•์„ ์ ์–ด๋ณด๊ณ ์ž ํ•œ๋‹ค.

apt-update-with-error

E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/jammy/InRelease is not valid yet (invalid for another 5min 1s). Updates for this repository will not be applied.

์˜ค๋ฅ˜ ์ฆ์ƒ์€ ๋ฆด๋ฆฌ์Šค ํŒŒ์ผ์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋ฐ, 5๋ถ„ 1์ดˆ๋™์•ˆ ์œ ํšจํ•˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ํ•œ๋‹ค.
๋ฌด์Šจ ๋ง์ธ๊ฐ€ ์‹ถ์€๋ฐ, 5๋ถ„ ์žˆ๋‹ค๊ฐ€ ์—…๋ฐ์ดํŠธ ํ•ด๋ณด๋ผ๋Š” ๊ฒƒ์ด๋‹ค.

์›์ธ

์˜ค๋žซ๋™์•ˆ ์ ˆ์ „๋ชจ๋“œ๋กœ ๋‘์–ด์„œ ์‹œ๊ฐ„ ๋™๊ธฐํ™”๊ฐ€ ์•ˆ๋œ ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค.
์žฌ๋ถ€ํŒ…ํ•˜์ง€ ์•Š์œผ๋ ค๊ณ  ํ–ˆ๊ธฐ์—, ํ•ด๊ฒฐ์„ ์œ„ํ•ด ๋” ๋งŽ์€ ์‹œ๊ฐ„์„ ๋ณด๋ƒˆ๋‹ค.

Linux Runlevel - ๋Ÿฐ๋ ˆ๋ฒจ/๋ถ€ํŠธ๋ ˆ๋ฒจ

  • kkumtree

2023-06-22T16:07:05+09:00

CPU๋ฅผ 1600X์—์„œ 5700X๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ์ง„ํ–‰ํ•˜๊ธฐ์— ์•ž์„œ,
RunLevel(๋Ÿฐ๋ ˆ๋ฒจ/๋ถ€ํŠธ๋ ˆ๋ฒจ)์— ๋Œ€ํ•ด ํ•œ๋ฒˆ ๋ฉ”๋ชจํ•˜๊ณ ์ž ํ•จ.

Runlevel

  • 7๊ฐ€์ง€ ๋ ˆ๋ฒจ์ด ์กด์žฌ

    • man runlevel ์ฐธ๊ณ 
  • Level 5์„ ์ œ์™ธํ•˜๊ณ ๋Š”, cli ํ™˜๊ฒฝ์—์„œ๋งŒ ๊ตฌ๋™

  • Linux Standard Base ๊ธฐ์ค€

    • ls -l /lib/systemd/system/runlevel?.target ๋ช…๋ น์–ด๋กœ ํ™•์ธ ๊ฐ€๋Šฅ
RunLevel EN ์„ค๋ช… ๋น„๊ณ 
0 Power Off ์‹œ์Šคํ…œ ์ข…๋ฃŒ(์ค‘๋‹จ/Halt)
1 Rescue ์‹œ์Šคํ…œ ๋ณต๊ตฌ ๋‹จ์ผ ์‚ฌ์šฉ์ž ๋ชจ๋“œ
2 Multi-User ๋‹ค์ค‘ ์‚ฌ์šฉ์ž(ํ…์ŠคํŠธ ๋ชจ๋“œ, ๋„คํŠธ์›Œํฌ ์„œ๋น„์Šค X) ์‚ฌ์šฉ X (์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅ)
3 Multi-User ๋‹ค์ค‘ ์‚ฌ์šฉ์ž(ํ…์ŠคํŠธ ๋ชจ๋“œ)
4 Multi-User ์ƒ๋™ ์‚ฌ์šฉ X (์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ€๋Šฅ)
5 Graphical ๋‹ค์ค‘ ์‚ฌ์šฉ์ž ๋ชจ๋“œ (๊ทธ๋ž˜ํ”ฝ ๋ชจ๋“œ) X-window ๊ธฐ๋ฐ˜
6 Reboot ์‹œ์Šคํ…œ ๋ฆฌ๋ถ€ํŒ…

์šด์˜์ฒด์ œ(Ubuntu 22.04 ๊ธฐ์ค€)๋‚ด ํ™•์ธ

  • su ๋ชจ๋“œ์—์„œ. target์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋งํ‚น๋˜์–ด ์žˆ์Œ์„ ํ™•์ธ
  • ls -al /lib/systemd/system/runlevel?.target: default
  • ls -al /etc/systemd/system | grep runlevel?.target.wants: ์‚ฌ์šฉ์ž ์ •์˜์šฉ ํด๋”
sudo su
ls -l /lib/systemd/system/runlevel?.target*

runlevel

Ubuntu Pro๋ฅผ ์ ์šฉํ•˜๊ณ  ์‚ฌ์šฉํ•ด๋ณด๊ธฐ

  • kkumtree

2023-03-17T11:14:50+09:00

ํŠœํ† ๋ฆฌ์–ผ ๋ ˆ๋ฒจ์˜ ๊ฒŒ์‹œ๋ฌผ์ž…๋‹ˆ๋‹ค. 
๋ชจ๋“  ์ •๋ณด๋Š” https://ubuntu.com/pro/tutorial ์— ๊ธฐ์ดˆํ•ฉ๋‹ˆ๋‹ค. 

๊ธฐํƒ€ ์ดˆ๊ธฐ ๊ตฌ์„ฑ ์ค‘ ์ด์Šˆ๋Š” ์•„๋ž˜๋„ ์ฐธ๊ณ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/index.html 

๊ณ„๊ธฐ

ํ•„์ž๊ฐ€ ๊ฐœ์ธ ๋ฐ์Šคํฌํƒ‘์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” Ubuntu ๋ฒ„์ „์ด 22.10 (Kinetic Kudu), 23.04 (Lunar Lobster) ์ด๊ธฐ์—, Ubuntu Pro๋ฅผ ์ ์šฉํ•ด๋ณผ ๊ธฐํšŒ๊ฐ€ ์—†์—ˆ๋‹ค.
์ด๋ฒˆ์— ์ง€์ธ ๋ถ„์œผ๋กœ๋ถ€ํ„ฐ ์ œ๊ณต๋ฐ›์€ ์—‘์„ธ์Šค๋žฉ(XSLAB)์‚ฌ์˜ ARM ๊ธฐ๋ฐ˜ Vraptor SQ nano๋ฅผ
ํด๋ฆฐ์„ค์น˜ํ•˜๊ณ  ๋‚˜๋‹ˆ Ubuntu 20.04.6 LTS (Focal Fossa) ๋ฒ„์ „์ด์—ˆ๊ธฐ์—, Ubuntu Pro๋ฅผ ์ ์šฉํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค.
ํ•ด๋‹น ์ œํ’ˆ์€ ๋ณด๋ผ๋ชฐ/voramall์—์„œ๋„ ๋งŒ๋‚˜๋ณผ ์ˆ˜ ์žˆ๋‹ค.

Ubuntu Pro๋ž€?

Ubuntu Pro๋Š” Ubuntu์˜ ๊ตฌ๋… ์ƒํ’ˆ์œผ๋กœ, ๋ณด์•ˆ ๋“ฑ์˜ ์ง€์› ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•œ ์„œ๋น„์Šค๋กœ ์‚ฌ์ „์— ๋ณด์•ˆ ์ทจ์•ฝ์ ์„ ๋น ๋ฅด๊ฒŒ ๋ณด์™„ํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณดํ˜ธํ•˜๋Š”๊ฒŒ ์—ฌ๋Ÿฌ๋ชจ๋กœ ์ ˆ๊ฐ๋˜์ง€ ์•Š์„ ๊นŒ ์‹ถ๊ธฐ์— ์ธ์ƒ ๊นŠ์—ˆ๋˜ ํ”„๋กœ๋•ํŠธ์˜€๋‹ค.

kkumtree

Source code on GitHub

ยฉ 2025 kkumtree and contributors All rights reserved.
Licensed under
CC BY-NC-ND 4.0