虽然我只是按照主站点上的说明设法在 Ubuntu 19.10 上运行无根 docker 容器,但它只持续了一天。
https://docs.docker.com/engine/security/rootless/
重新启动机器后,docker daemon 再也没有工作过
systemctl --user status docker
● docker.service - Docker Application Container Engine (Rootless)
Loaded: loaded (/home/ice/.config/systemd/user/docker.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-03-02 11:29:40 GMT; 2h 28min ago
Docs: https://docs.docker.com
Process: 1389 ExecStart=/home/ice/bin/dockerd-rootless.sh --experimental --storage-driver=overlay2 (code=exited, status=1/FAILURE)
Main PID: 1389 (code=exited, status=1/FAILURE)
Mar 02 11:29:40 fractal systemd[8403]: docker.service: Service RestartSec=10s expired, scheduling restart.
Mar 02 11:29:40 fractal systemd[8403]: docker.service: Scheduled restart job, restart counter is at 3.
Mar 02 11:29:40 fractal systemd[8403]: Stopped Docker Application Container Engine (Rootless).
Mar 02 11:29:40 fractal systemd[8403]: docker.service: Start request repeated too quickly.
Mar 02 11:29:40 fractal systemd[8403]: docker.service: Failed with result 'exit-code'.
Mar 02 11:29:40 fractal systemd[8403]: Failed to start Docker Application Container Engine (Rootless).
即使直接启动,它也会显示为失败:
INFO[2020-03-02T11:44:18.153611017Z] containerd successfully booted in 0.004537s
INFO[2020-03-02T11:44:18.159997216Z] parsed scheme: "unix" module=grpc
INFO[2020-03-02T11:44:18.160074256Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-03-02T11:44:18.160120957Z] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-03-02T11:44:18.160150557Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-03-02T11:44:18.161936535Z] parsed scheme: "unix" module=grpc
INFO[2020-03-02T11:44:18.161964255Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-03-02T11:44:18.161985036Z] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-03-02T11:44:18.161998776Z] ClientConn switching balancer to "pick_first" module=grpc
ERRO[2020-03-02T11:44:18.164125566Z] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded. storage-driver=overlay2
ERRO[2020-03-02T11:44:18.164168586Z] [graphdriver] prior storage driver overlay2 failed: driver not supported
INFO[2020-03-02T11:44:18.164831159Z] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2020-03-02T11:44:18.164842919Z] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
failed to start daemon: error initializing graphdriver: driver not supported
[rootlesskit:child ] error: command [/home/ice/bin/dockerd-rootless.sh --experimental] exited: exit status 1
[rootlesskit:parent] error: child exited: exit status 1
新内核
$ uname -a
Linux fractal 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.10
DISTRIB_CODENAME=eoan
DISTRIB_DESCRIPTION="Ubuntu 19.10"
$ docker version
Client: Docker Engine - Community
Version: 19.03.6
API version: 1.40
Go version: go1.12.16
Git commit: 369ce74a3c
Built: Thu Feb 13 01:24:49 2020
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///run/user/1000/docker.sock. Is the docker daemon running?
即使运行配置检查,也可以
- Storage Drivers:
- "aufs":
- CONFIG_AUFS_FS: enabled (as module)
- "btrfs":
- CONFIG_BTRFS_FS: enabled (as module)
- CONFIG_BTRFS_FS_POSIX_ACL: enabled
- "devicemapper":
- CONFIG_BLK_DEV_DM: enabled
- CONFIG_DM_THIN_PROVISIONING: enabled (as module)
- "overlay":
- CONFIG_OVERLAY_FS: enabled (as module)
- "zfs":
- /dev/zfs: present
- zfs command: missing
- zpool command: missing