raspbianstretch에 도커를 설치하는 중 오류가 발생했습니다.

raspbianstretch에 도커를 설치하는 중 오류가 발생했습니다.

rpi4에 docker를 설치하려고 하는데 실행할 때 이 오류가 발생합니다.

sudo apt-get install docker-ce docker-ce-cli containerd.io -y

나는 가지고있다

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-02-15 19:44:36 GMT; 14ms ago
     Docs: https://docs.docker.com
  Process: 9174 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 9174 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce:armhf (--configure):
 installed docker-ce:armhf package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:armhf:
 docker-ce-rootless-extras:armhf depends on docker-ce; however:
  Package docker-ce:armhf is not configured yet.

dpkg: error processing package docker-ce-rootless-extras:armhf (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u6) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
 docker-ce:armhf
 docker-ce-rootless-extras:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

내 저널ctl 로그

$ journalctl -fu docker
-- Logs begin at Thu 2019-02-14 10:11:58 GMT. --
Feb 15 19:44:43 raspberrypi4 dockerd[9311]: failed to start daemon: error initializing graphdriver: driver not supported
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:43 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Scheduled restart job, restart counter is at 4.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Stopped Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Start request repeated too quickly.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.

뭐가 문제 야?

답변1

커널 헤더를 설치한 후에도 동일한 문제가 발생했습니다. 이 작업도 수행했다면 RasPi를 다시 시작하고 서비스 상태를 확인하는 것을 잊지 마세요.

sudo systemctl status docker.service

또한 에서 호스트를 지정하는 것을 선호합니다 /etc/docker/daemon.json.여기자세한 내용은.

그래서 유닛 구성 -H에서 옵션 systemd( /lib/systemd/system/docker.service) 을 제거해야 합니다.

무슨 일이 일어나고 있는지 확실하지 않지만 재부팅 후 모든 것이 잘 작동했습니다. 파일이 다음 apt upgrade또는 apt install docker-ce.

관련 정보