Docker

Technology

컨테이너 기반 가상화 플랫폼 → 가상화 참조

자주 쓰는 명령어

exited된 모든 컨테이너 삭제

docker rm $(docker ps -a -q -f status=exited)

환경 설정

Apple Silicon (M1/M2) Mac - Lima 사용

Lima로 Docker Desktop 대체하기

# 기본 docker 컨테이너 실행
limactl start --name default template://docker

메모리 부족 문제 해결 (Airflow 등 대용량 컨테이너용):

wget https://raw.githubusercontent.com/lima-vm/lima/master/examples/docker.yaml
mv docker.yaml default.yaml

default.yaml 수정:

cpus: 4
memory: "8GiB"
disk: "100GiB"
limactl start default.yaml

lima에서 writable 마운트 디렉토리 설정 (~/.lima/default/lima.yaml):

mounts:
  - location: "~/docker/airflow"
    writable: true

Trouble Shooting

관련 노트

  • Kubernetes - 컨테이너 오케스트레이션
  • 가상화 - 가상화 개념 (QEMU/KVM 포함)
  • Airflow - Docker Compose 기반 Airflow 설치
  • Kafka - Docker Compose 기반 Kafka 구성