# Ubuntu 16.04에서 Docker가 깨졌나요?

**URL:** https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873
**Category:** Self-hosting
**Created:** [1월 16, 2020, 8:23오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873 "2020-01-16T20:23:22Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [1월 16, 2020, 8:23오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/1 "2020-01-16T20:23:22Z")

</div>

웹 UI를 통해 Docker 매니저를 업데이트하려고 할 때 Docker 설치에 오류가 발생했습니다. [sam의 추천](https://meta.discourse.org/t/how-do-i-debug-docker-installation-issues/13657?u=tophee)을 따라 했더니 아래 메시지가 표시되어 Docker 설치가 깨져 있다는 것을 알고 있습니다:

```plaintext
$ docker run -it --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:9572f7cdcee8591948c2963463447a53466950b3fc15a247fcad1917ca215a2f
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: no status provided on response: unknown.
ERRO[0003] error waiting for container: context canceled

```

그런 다음, 제가 보고 있는 현상과 일치하는 것 같은 이 GitHub 이슈를 찾았습니다:

> <https://github.com/docker/for-linux/issues/813>
>
> \* \[x\] This is a bug report
> \* \[\] This is a feature request
> \* \[\] I searched ex…isting issues before opening this one
> 
> 
> 
> \### Expected behavior
> 
> 
> \### Actual behavior
> 
> \`\`\`
> docker: Error response from daemon: no status provided on response: unknown.
> ERRO\[0000\] error waiting for container: context canceled
> \`\`\`
> 
> \### Steps to reproduce the behavior
> \`\`\`
> sudo docker run --rm hello-world
> \`\`\`
> 
> 
> \*\*Output of \`docker version\`:\*\*
> 
> \`\`\`
> Client: Docker Engine - Community
> Version: 19.03.3
> API version: 1.40
> Go version: go1.12.10
> Git commit: a872fc2
> Built: Tue Oct 8 00:59:54 2019
> OS/Arch: linux/amd64
> Experimental: false
> 
> Server: Docker Engine - Community
> Engine:
> Version: 19.03.3
> API version: 1.40 (minimum version 1.12)
> Go version: go1.12.10
> Git commit: a872fc2
> Built: Tue Oct 8 00:58:28 2019
> OS/Arch: linux/amd64
> Experimental: false
> containerd:
> Version: 1.2.5
> GitCommit: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
> runc:
> Version: 1.0.0-rc8+dev
> GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
> docker-init:
> Version: 0.18.0
> GitCommit: fec3683
> \`\`\`
> 
> \*\*Output of \`docker info\`:\*\*
> 
> \`\`\`
> Client:
> Debug Mode: false
> 
> Server:
> Containers: 0
> Running: 0
> Paused: 0
> Stopped: 0
> Images: 2
> Server Version: 19.03.3
> Storage Driver: overlay2
> Backing Filesystem: extfs
> Supports d\_type: true
> Native Overlay Diff: true
> Logging Driver: json-file
> Cgroup Driver: cgroupfs
> Plugins:
> Volume: local
> Network: bridge host ipvlan macvlan null overlay
> Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
> Swarm: inactive
> Runtimes: runc
> Default Runtime: runc
> Init Binary: docker-init
> containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
> runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
> init version: fec3683
> Security Options:
> apparmor
> seccomp
> Profile: default
> Kernel Version: 4.15.0-1046-gcp
> Operating System: Ubuntu 16.04.6 LTS
> OSType: linux
> Architecture: x86\_64
> CPUs: 2
> Total Memory: 3.853GiB
> Name: dev-core
> ID: ZVTZ:2OZX:VHFQ:OFY7:R7NR:RN32:SO2L:QHAX:5H5R:27FJ:5L2B:C5Z7
> Docker Root Dir: /var/lib/docker
> Debug Mode: false
> Registry: https://index.docker.io/v1/
> Labels:
> Experimental: false
> Insecure Registries:
> 127.0.0.0/8
> Live Restore Enabled: false
> 
> WARNING: No swap limit support
> \`\`\`
> 
> \*\*Additional environment details (AWS, VirtualBox, physical, etc.)\*\*
> AWS
> |Distributor ID:|Ubuntu|
> |---|---|
> |Description:|Ubuntu 16.04.6 LTS|
> |Release:|16.04|
> |Codename:|xenial|

제가 Ubuntu 16.04를 사용 중이므로, [이것](https://github.com/docker/for-linux/issues/813#issuecomment-540504488)이 해결책인 것 같습니다:

> 1. deb 저장소를 추가합니다:
> 
> ```plaintext
> sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu xenial-security main universe'
> 
> ```
> 
> 1. runc를 설치합니다 (참고: `~` 기호가 GitHub에서 [@vietthang207](https://github.com/vietthang207)님의 원본 게시물에서 깨져 보일 수 있습니다):
> 
> ```plaintext
> sudo apt-get install runc=1.0.0~rc7+git20190403.029124da-0ubuntu1~16.04.4
> 
> ```
> 
> 1. runc를 설치하면 docker-ce가 제거되므로, 다시 설치합니다:
> 
> ```plaintext
> sudo apt-get install docker-ce
> 
> ```

이렇게 하는 것이 안전한지, 아니면 어떤 결과가 있을지 확인해 주실 수 있나요? Docker가 제거될까 봐 조금 두렵습니다. 그렇다면 이 과정에서 제 사이트가 중단될 것이라 추측합니다 (이상하게도, Docker가 깨져 있음에도 불구하고 현재 사이트는 여전히 정상 작동 중입니다). 하지만 제 Discourse 설치 환경은 안전한가요, 아니면 컨테이너도 사라질까요?

수정: 제가 감히 진행해 본 한계는 다음과 같습니다:

```plaintext
$ sudo apt-get install runc=1.0.0~rc7+git20190403.029124da-0ubuntu1~16.04.4
[sudo] password for christoph:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  aufs-tools cgroupfs-mount docker-ce-cli libltdl7
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  containerd.io docker-ce
The following NEW packages will be installed:
  runc
0 upgraded, 1 newly installed, 2 to remove and 21 not upgraded.
1 not fully installed or removed.
Need to get 1,890 kB of archives.
After this operation, 192 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
$

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 16, 2020, 11:11오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/2 "2020-01-16T23:11:18Z")

</div>

재부팅을 해보셨나요? 업그레이드를 한 후 재부팅을 하지 않으면 Docker에서 문제가 생기는 경우가 있었습니다.

네. 그건 좀 무섭게 들리네요. 16.04에 사이트들이 있고, `runc` 관련 작업을 한 적이 없다는 것은 알고 있습니다.

다운타임이 걱정되고 Digital Ocean을 사용 중이시라면, 다음 방법을 고려해 볼 수 있습니다.

1. 18.04로 새로운 드롭렛을 생성하고 클린 설치를 진행합니다.
2. 플로팅 IP를 확보하여 기존 서버를 가리키게 하고, DNS를 해당 IP로 설정합니다.
3. 기존 포럼을 읽기 전용으로 설정합니다.
4. 백업을 수행합니다.
5. 새 서버로 복원합니다.
6. 플로팅 IP를 새 서버로 다시 지정합니다.

이렇게 하면 다운타임 없이 백업 및 복원에 걸리는 읽기 전용 시간만 발생하게 됩니다. 읽기 전용 설정을 적용하기 전에 한두 번 연습해 볼 수도 있습니다. 또한 업로드 파일을 백업에 포함시키지 않고 `rsync`로 동기화하는 방법을 사용하면, 데이터베이스만 백업/복원하면 됩니다.

기존의 Let’s Encrypt 인증서도 가져와야 할 것입니다. 그렇지 않으면 인증서를 다시 발급받아야 할 것 같습니다.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [1월 16, 2020, 11:17오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/3 "2020-01-16T23:17:25Z")

</div>

> [@pfaffman](#):
>
> 재시도 해 보셨나요?

고려해 보다가 결국 하지 않기로 했습니다. 제 도커 설치 환경이 분명히 깨져 있는데도 포럼은 여전히 작동하고 있으니, 서버를 재시작하면 포럼까지 고장 날까 봐 걱정되었기 때문입니다. 그럴 가능성이 얼마나 될까요? 재시작을 시도해 볼까요?

다운타임 최소화에 대한 설명에 감사드립니다. 하지만 저는 DO(DigitalOcean)를 사용하지 않습니다. 다만 몇 시간이나 며칠 동안 지속되지 않는다면 다운타임은 전혀 문제가 되지 않습니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 16, 2020, 11:24오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/4 "2020-01-16T23:24:19Z")

</div>

> [@tophee](#):
>
> 재부팅을 시도해 봐야 할까요?

Docker를 업그레이드했고 여전히 설치되어 있으며, 이 문제가 업그레이드 시점에 발생했다면 재부팅으로 문제가 해결될 것이라고 꽤 확신합니다. **참고:** 무료 조언은 그 가격만큼의 가치만 있습니다. 😉

> [@tophee](#):
>
> 하지만 몇 시간이나 며칠 동안 지속되지 않는 한 다운타임은 전혀 문제가 되지 않습니다.

재부팅하기 전에 백업을 만들어 두세요. 최악의 경우, 백업과 `app.yml` 파일만 있으면 1시간도 안 돼 새 서버를 설정하고 처음부터 시작할 수 있습니다(데이터가 수십 GB나 되는 경우를 제외하고는요).

제 계획은 여러 호스팅 서비스에서 작동할 가능성이 높습니다.

만약 정말로 조심스러운 편이라면, 어딘가에 새 서버를 설정해 두고 백업을 거기로 가져오세요. 그렇게 하면 만약 상황이 심각하게 잘못되었다고 해도 대체 계획이 있게 됩니다.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [1월 16, 2020, 11:52오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/5 "2020-01-16T23:52:28Z")

</div>

> [@pfaffman](#):
>
> 무료 조언

정말 감사하게 생각합니다.

> [@pfaffman](#):
>
> 돈을 내고 산 만큼의 가치만 있다

사실 저는 그보다 훨씬 더 가치 있다고 생각합니다. 하지만 무슨 말씀인지 이해합니다.

> [@pfaffman](#):
>
> Docker를 업그레이드했고, 여전히 설치되어 있으며, 이 문제가 업그레이드 시점에 발생했다면 재부팅으로 문제가 해결될 것이라고 확신합니다.

정확히 말하면 다음과 같습니다:

1. discourse 웹 인터페이스를 통해 docker manager 업그레이드를 _시도_했지만 실패했습니다 (에러를 [여기](https://meta.discourse.org/t/upgrade-of-docker-manager-beta7-beta9-fails/137803/8?u=tophee)에 게시했습니다)
2. 그 다음 `. /launcher rebuild app`을 시도했지만 실패했고, [https://meta.discourse.org/t/how-do-i-debug-docker-installation-issues/13657로](https://meta.discourse.org/t/how-do-i-debug-docker-installation-issues/13657%EB%A1%9C) 유도되었습니다.
3. 이후 데이터 컨테이너와 web\_only 컨테이너가 분리되어 있으므로 다른 명령어를 사용해야 한다는 것을 깨닫고 `./launcher bootstrap web_only`을 시도했지만 동일한 오류가 발생했습니다.
4. [https://meta.discourse.org/t/how-do-i-debug-docker-installation-issues/13657의](https://meta.discourse.org/t/how-do-i-debug-docker-installation-issues/13657%EC%9D%98) 지침을 따랐습니다. 나머지 내용은 원글(OP)에 있습니다.

가능성이 있는 후속 문제를 해결할 시간이 있을 때 이번 주말에 재부팅을 시도해 볼 것 같습니다. 왜냐하면: 아니요, 저는 몇 년 전에 discourse 인스턴스 세 개를 설정해 두었지만, "새로운 서버를 시작하고 처음부터 다시 시작하는 것"은 아마도 하루 종일 바쁠 것입니다. 도메인을 새 IP 주소로 지정하는 것만으로도 잠재적으로 악몽 같은 일이 될 수 있습니다. 아니면 그렇지 않을 수도 있지만, 그렇다면 그것이 큰 문제가 아니라는 것을 알아내는 데에도 시간이 좀 걸릴 것입니다…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 17, 2020, 12:07오전 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/6 "2020-01-17T00:07:32Z")

</div>

> [@tophee](#):
>
> 그리고 “새 서버를 설정하고 처음부터 다시 시작하는 것”은 아마도 하루 종일 바쁠 일이 될 것입니다.

글쎄요, 제 전임자가 제공한 “수작업 설치”를 직접 했다면 수백 시간(훨씬 더 많은 시간)이 걸렸을 텐데, DNS 설정 방법을 아신다면 제 [설치 패키지](https://www.literatecomputing.com/discourse-installation-packages/)는 완전히 자동화되어 있으며 1시간 이내(대부분은 DNS 전파 시간)에 완료됩니다.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [11월 23, 2023, 7:45오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/7 "2023-11-23T19:45:47Z")

</div>



---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [11월 23, 2023, 7:54오후 UTC](https://meta.discourse.org/t/docker-broken-on-ubuntu-16-04/138873/8 "2023-11-23T19:54:58Z")

</div>


