Docker 기본
Docker 기본
VM vs Docker
- 여기서 말하는 Docker은 Docker Engine
- 기존에는 리눅스 특화인 LXC를 사용하였지만 후에 모든 OS에 대응 하기위해 runC(formerly known as libcontainer) 사용
- runC runs in the same OS as its host allowing sharing a lot of the host OS resource
- but still, for os except linux docker engine requires VM to host a linux kernel to run the container engine
- Layered file system (AuFS)
Docker daemon
- The Docker daemon (
dockerd
) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services. - /var/run/docker.sock (unix socket): Docker daemon이 기본적으로 수신(listen)하고 있는 Unix socket이고 컨테이너 내부에서 Docker daemon과 통신하는 데에 사용
- docker daemon socker을 마운트 하는 건 컨테이너에게 큰 권한을 제공함으로 신뢰 할수 있는 컨테이너에서만 주의해서 사용하자!
Reference
- Docker vs VM
- layered Architecture
- Layered Image
- 도커, 컨테이너 빌드 업
더 알아보기
This post is licensed under CC BY 4.0 by the author.