> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/ko/getting-started/requirements/setup-docker.md).

# 도커 설정

Overleaf는 Docker에서 실행됩니다. 다음을 설치해야 합니다:

* Docker Engine(Docker CE)
* Docker Compose **플러그인** (`docker compose`, v2)

이 단계들은 최신 Ubuntu LTS(20.04/22.04/24.04)를 대상으로 합니다.

{% hint style="warning" %}
설치하지 마세요 `docker.io` Ubuntu의 기본 apt 저장소에서.\
Docker의 공식 저장소를 사용하면 최신 Docker 버전과 `docker compose` 플러그인을 얻을 수 있습니다.
{% endhint %}

공식 문서는 다음에서 가져왔습니다: <https://docs.docker.com/engine/install/ubuntu/>.

{% stepper %}
{% step %}

### 1) 오래되었거나 충돌하는 패키지 제거(있는 경우)

이전에 다른 소스에서 Docker를 설치했다면, 먼저 제거하세요:

{% code overflow="wrap" %}

```bash
 sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
```

{% endcode %}

이 명령은 일부 패키지가 설치되어 있지 않아도 안전합니다.
{% endstep %}

{% step %}

### 2) Docker의 공식 apt 저장소 추가

사전 요구 사항 설치:

```bash
sudo apt update
sudo apt install -y ca-certificates curl
```

Docker GPG 키 추가:

{% code overflow="wrap" %}

```bash
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
```

{% endcode %}

저장소 추가:

{% code overflow="wrap" %}

```bash
# 저장소를 Apt 소스에 추가:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF

sudo apt update
```

{% endcode %}
{% endstep %}

{% step %}

### 3) Docker Engine + Compose 플러그인 설치

Docker와 Compose 플러그인을 설치합니다:

{% code overflow="wrap" %}

```bash
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

{% endcode %}

부팅 시 Docker 시작:

```bash
sudo systemctl enable --now docker
```

{% endstep %}

{% step %}

### 4) 설치 확인

다음 명령은 오류 없이 실행되어야 합니다:

```bash
docker --version
docker compose version
sudo docker run --rm hello-world
docker ps
```

{% endstep %}

{% step %}

### 5) (선택 사항) sudo 없이 Docker 실행

사용자를 `docker` 그룹에 추가하세요:

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

그런 다음 **로그아웃했다가 다시 로그인하거나**, 또는 다음을 실행하세요:

```bash
newgrp docker
```

이제 다음은 `sudo`:

```bash
docker ps
```

{% hint style="danger" %}
해당 `docker` 없이 작동해야 합니다.\
이 그룹은 호스트에서 루트와 동등한 접근 권한을 가집니다.\
이는 일반적인 Overleaf 설치에서 예상되는 동작이며, 특히 Sandboxed Compiles를 활성화하는 경우 중요합니다.
{% endhint %}
{% endstep %}
{% endstepper %}

### 다음 단계

Docker가 작동하면, 다음의 Toolkit 설치 단계로 계속 진행하세요 [Toolkit 사용하기](/on-premises/ko/installation/using-the-toolkit.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/ko/getting-started/requirements/setup-docker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
