Docker란? (도커의 특징)

원본 게시물 입니다~~

Docker의 특징

Docker is an open source platform for building, deploying, and managing containerized applications.

도커(Docker) 란 리눅스의 응용 프로그램들을 프로세스 격리 기술들을 사용해 컨테이너로 실행하고 관리하는 오픈소스 프로젝트이다.

도커는 다음과 같은 3가지 특징을 갖는다.

  1. 애플리케이션의 이미지화
  2. 프로세스간 격리
  3. 확장성/이식성.

이미지를 이해하기 전에 컨테이너(Container)에 대해 알 필요가 있다. 도커 공식 홈페이지는 Container를 다음과 같이 정의하고 있다.

Simply put, a container is a sandboxed process on your machine that is isolated from all other processes on the host machine. That isolation leverages kernel namespaces and cgroups, features that have been in Linux for a long time.

https://velog.velcdn.com/images/yeongori/post/7a6a52a4-549b-4791-9d05-0c7a37363166/image.png

Container는 host machine의 다른 모든 프로세스와 격리된 프로세스이며 이러한 격리는 Linux의 kernel 기능을 사용한다.

~~컨테이너에 대해서는 뒤에서 자세히 설명하겠다. ~~


격리(Isolation)

도커는 내부적으로 리눅스의 LXC 라이브러리를 사용하는데, LXC는 내부적으로 chroot, cgroup, namespace등 리눅스 API를 사용한다.

chroot (change root directory)

chroot는 파일 시스템을 격리해주는 기술이다. 컨테이너 별로 파일 시스템을 다르게 해 실행 가능한 명령어, 기능을 다르게 할 수 있다.