# Install Docker

아래 시리즈 글을 보고 정리하였다.

{% embed url="<https://subicura.com/2017/01/19/docker-guide-for-beginners-2.html>" %}

우분투 18.04를 기준으로 작성하였다.

자동 설치 스크립트를 이용해 도커를 설치한다.

```bash
$ curl -fsSL https://get.docker.com/ | sudo sh
```

도커는 기본적으로 루트 권한이 필요하다. 루트가 아닌 사용자가 sudo 없이 사용하려면 해당 사용자를 도커 그룹에 추가한다. 사용자가 로그인 중이라면 다시 로그인 후 권한이 적용된다.

```bash
$ sudo usermod -aG docker $USER
```

설치가 완료되었다면 정상적으로 설치되었는지 도커 명령어를 입력해 확인한다.

```bash
$ docker version
```

Client와 Server 정보가 정상적으로 출력되었다면 설치가 완료된 것이다. Server 정보가 안나오고 `Error response from daemon: Bad response from Docker engine`이라는 메시지가 출력되는 경우는 보통 docker daemon이 정상적으로 실행되지 않았거나 sudo를 입력하지 않은 경우이다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://donghyunlee.gitbook.io/write-up/project/how-to-find-container-platform-escape-bug/docker/install-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
