as the line under it "waiting for dockerd" never gets shown in the console.
This seems to happen when I rerun the docker container. For example:
# entrypoint.sh does not finish here:
~/Projects/learning/scenarios/src/docker (main*) » docker-compose up docker
Starting docker_docker_1 ... done
Attaching to docker_docker_1
docker_1 | Docker: Docker version 20.10.12, build 459d0df
docker_1 | Kernel: 5.15.0
docker_1 | Rootfs: Debian GNU/Linux 11 (bullseye)
docker_1 |
docker_1 | Configuration: MEM=2G DISK=10G
docker_1 | Starting OpenBSD Secure Shell server: sshd.
docker_1 | For better performance, consider mounting a tmpfs on /umlshm like this: `docker run --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g`
^CGracefully stopping... (press Ctrl+C again to force)
Stopping docker_docker_1 ...
^CKilling docker_docker_1 ...
^CERROR: Aborting.
-------------------------------------------------
# ... so I remove the volume + container
~/Projects/learning/scenarios/src/docker (main*) » docker-compose rm -v 1 ↵
Going to remove docker_docker_1
Are you sure? [yN] y
Removing docker_docker_1 ... done
-------------------------------------------------
# ... then when it's started up again it works
~/Projects/learning/scenarios/src/docker (main*) » docker-compose up docker
Creating docker_docker_1 ... done
Attaching to docker_docker_1
docker_1 | Docker: Docker version 20.10.12, build 459d0df
docker_1 | Kernel: 5.15.0
docker_1 | Rootfs: Debian GNU/Linux 11 (bullseye)
docker_1 |
docker_1 | Configuration: MEM=2G DISK=10G
docker_1 | Starting OpenBSD Secure Shell server: sshd.
docker_1 | Formatting /persistent/var_lib_docker.img
docker_1 | For better performance, consider mounting a tmpfs on /umlshm like this: `docker run --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g`
docker_1 | waiting for dockerd ....
docker_1 | Executing "bash"
docker_docker_1 exited with code 0
-------------------------------------------------
# ... but the second time it does not.
~/Projects/learning/scenarios/src/docker (main*) » docker-compose up docker
Starting docker_docker_1 ... done
Attaching to docker_docker_1
docker_1 | Docker: Docker version 20.10.12, build 459d0df
docker_1 | Kernel: 5.15.0
docker_1 | Rootfs: Debian GNU/Linux 11 (bullseye)
docker_1 |
docker_1 | Configuration: MEM=2G DISK=10G
docker_1 | Starting OpenBSD Secure Shell server: sshd.
docker_1 | For better performance, consider mounting a tmpfs on /umlshm like this: `docker run --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g`
# cat /tmp/env
DIUID_DOCKERD_FLAGS=""
DIUID_DOCKERD_GROUP="docker"
# cat /tmp/kernel.log
Core dump limits :
soft - NONE
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir.../umlshm
Checking if /umlshm is on tmpfs...no
Warning: tempdir /umlshm is not on tmpfs
Checking PROT_EXEC mmap in /umlshm...OK
Adding 1454080 bytes to physical memory to account for exec-shield gap
Linux version 5.15.0 (root@buildkitsandbox) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 Fri Jan 7 10:17:39 UTC 2022
Zone ranges:
Normal [mem 0x0000000000000000-0x00000000e0162fff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000080162fff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000080162fff]
Built 1 zonelists, mobility grouping on. Total pages: 516445
Kernel command line: rootfstype=hostfs rw vec0:transport=bess,dst=/run/slirp4netns-bess.sock,depth=128,gro=1 mem=2G init=/init.sh root=98:0 console=tty
Unknown command line parameters: mem=2G
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 2054144K/2098572K available (4340K kernel code, 1154K rwdata, 1196K rodata, 161K init, 179K bss, 44428K reserved, 0K cma-reserved)
NR_IRQS: 64
clocksource: timer: mask: 0xffffffffffffffff max_cycles: 0x1cd42e205, max_idle_ns: 881590404426 ns
Calibrating delay loop... 6660.91 BogoMIPS (lpj=33304576)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
Checking that host ptys support output SIGIO...Yes
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.0+0x128/0x153 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: 0, 6144 bytes, linear)
NET: Registered PF_NETLINK/PF_ROUTE protocol family
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
PTP clock support registered
clocksource: Switched to clocksource timer
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
NET: Registered PF_INET protocol family
IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes, linear)
TCP: Hash tables configured (established 16384 bind 16384)
UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
printk: console [stderr0] disabled
mconsole (version 2) initialized on /root/.uml/bPQvo0/mconsole
Checking host MADV_REMOVE support...OK
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
hwrng: no data available
workingset: timestamp_bits=46 max_order=19 bucket_order=0
io scheduler mq-deadline registered
io scheduler kyber registered
io scheduler bfq registered
loop: module loaded
tun: Universal TUN/TAP device driver, 1.6
PPP generic driver version 2.4.2
xt_time: kernel timezone is -0000
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
IPVS: ipvs loaded.
NET: Registered PF_PACKET protocol family
8021q: 802.1Q VLAN Support v1.8
9pnet: Installing 9P2000 support
Initialized stdio console driver
Console initialized on /dev/tty0
printk: console [tty0] enabled
Initializing software serial port version 1
Choosing a random ethernet address for device vec0
printk: console [mc-1] enabled
Failed to initialize ubd device 0 :Couldn't determine size of device's file
epollctl add err fd 1, Operation not permitted
epollctl add err fd 0, Operation not permitted
VFS: Mounted root (hostfs filesystem) on device 0:13.
devtmpfs: mounted
This architecture does not have kernel memory protection.
Run /init.sh as init process
+ source /tmp/env
++ DIUID_DOCKERD_FLAGS=
++ DIUID_DOCKERD_GROUP=docker
+ mount -t proc proc /proc/
+ mount -t sysfs sys /sys/
+ mount -t cgroup2 none /sys/fs/cgroup
+ mkdir /sys/fs/cgroup/init.tmp
+ echo 1
+ cat /sys/fs/cgroup/cgroup.controllers
cpu io memory pids misc
+ echo '+cpu +io +memory +pids'
+ echo 1
+ rmdir /sys/fs/cgroup/init.tmp
+ mount -t tmpfs none /run
+ mkdir /dev/pts
+ mount -t devpts devpts /dev/pts
+ rm /dev/ptmx
+ ln -s /dev/pts/ptmx /dev/ptmx
+ rngd -r /dev/urandom
random: rngd: uninitialized urandom read (4 bytes read)
random: rngd: uninitialized urandom read (4 bytes read)
+ mkdir -p /var/lib/docker/
random: rngd: uninitialized urandom read (2500 bytes read)
random: crng init done
random: 2 urandom warning(s) missed due to ratelimiting
+ mount -t ext4 /persistent/var_lib_docker.img /var/lib/docker/
loop0: detected capacity change from 0 to 20971520
EXT4-fs (loop0): recovery complete
EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
+ ip link set dev lo up
+ ip link set dev vec0 up
+ ip addr add 10.0.2.100/24 dev vec0
+ ip route add default via 10.0.2.2
+ ssh -f -N -o StrictHostKeyChecking=no -R/var/run/docker.sock:/var/run/docker.sock -R0.0.0.0:2375:127.0.0.1:2375 -R0.0.0.0:2376:127.0.0.1:2376 10.0.2.2
Warning: remote port forwarding failed for listen path /var/run/docker.sock
+ chmod 0660 /var/run/docker.sock
chmod: cannot access '/var/run/docker.sock': No such file or directory
++ which diuid-docker-proxy
+ PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
+ dockerd --userland-proxy-path=/usr/bin/diuid-docker-proxy -H unix:///var/run/docker.sock
INFO[2022-10-24T10:25:16.795237212Z] Starting up
INFO[2022-10-24T10:25:16.812600668Z] libcontainerd: started new containerd process pid=56
INFO[2022-10-24T10:25:16.813172572Z] parsed scheme: "unix" module=grpc
INFO[2022-10-24T10:25:16.813310300Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-10-24T10:25:16.813460828Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-10-24T10:25:16.813596508Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2022-10-24T10:25:17.162216284Z] starting containerd revision=7b11cfaabd73bb80907dd23182b9347b4245eb5d version=1.4.12
INFO[2022-10-24T10:25:17.236243548Z] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2022-10-24T10:25:17.236773468Z] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.237795420Z] skip loading plugin "io.containerd.snapshotter.v1.aufs"... error="aufs is not supported (modprobe aufs failed: exec: \"modprobe\": executable file not found in $PATH \"\"): skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.237992284Z] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.238533468Z] skip loading plugin "io.containerd.snapshotter.v1.btrfs"... error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.238600028Z] loading plugin "io.containerd.snapshotter.v1.devmapper"... type=io.containerd.snapshotter.v1
WARN[2022-10-24T10:25:17.238924124Z] failed to load plugin io.containerd.snapshotter.v1.devmapper error="devmapper not configured"
INFO[2022-10-24T10:25:17.239025244Z] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.239264604Z] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.240228700Z] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.240650588Z] skip loading plugin "io.containerd.snapshotter.v1.zfs"... error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-10-24T10:25:17.240718172Z] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2022-10-24T10:25:17.240819292Z] could not use snapshotter devmapper in metadata plugin error="devmapper not configured"
INFO[2022-10-24T10:25:17.240876380Z] metadata content store policy set policy=shared
INFO[2022-10-24T10:25:17.243032668Z] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2022-10-24T10:25:17.243225180Z] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2022-10-24T10:25:17.244016732Z] loading plugin "io.containerd.service.v1.introspection-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244180828Z] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244254812Z] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244314716Z] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244534108Z] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244657500Z] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244785500Z] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244906076Z] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.244970844Z] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2022-10-24T10:25:17.245654876Z] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2022-10-24T10:25:17.246407772Z] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2022-10-24T10:25:17.248518748Z] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2022-10-24T10:25:17.248655196Z] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2022-10-24T10:25:17.249348956Z] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249470044Z] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249588060Z] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249655644Z] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249715804Z] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249782108Z] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249843292Z] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249902428Z] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.249960540Z] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2022-10-24T10:25:17.250168924Z] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.250349404Z] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.250439260Z] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.250501980Z] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2022-10-24T10:25:17.254302556Z] serving... address=/var/run/docker/containerd/containerd-debug.sock
INFO[2022-10-24T10:25:17.254658908Z] serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
INFO[2022-10-24T10:25:17.255007836Z] serving... address=/var/run/docker/containerd/containerd.sock
INFO[2022-10-24T10:25:17.255089244Z] containerd successfully booted in 0.097627s
WARN[2022-10-24T10:25:17.304159836Z] unable to modify root key limit, number of containers could be limited by this quota: open /proc/sys/kernel/keys/root_maxkeys: no such file or directory
INFO[2022-10-24T10:25:17.309119836Z] parsed scheme: "unix" module=grpc
INFO[2022-10-24T10:25:17.309181532Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-10-24T10:25:17.309234780Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-10-24T10:25:17.309281372Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2022-10-24T10:25:17.321136732Z] parsed scheme: "unix" module=grpc
INFO[2022-10-24T10:25:17.321197148Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-10-24T10:25:17.321248092Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-10-24T10:25:17.321292892Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2022-10-24T10:25:17.341079900Z] [graphdriver] using prior storage driver: overlay2
WARN[2022-10-24T10:25:17.368008028Z] Unable to find cpuset controller
INFO[2022-10-24T10:25:17.376886620Z] Loading containers: start.
WARN[2022-10-24T10:25:17.379827036Z] Running modprobe bridge br_netfilter failed with message: , error: exec: "modprobe": executable file not found in $PATH
WARN[2022-10-24T10:25:18.129315164Z] Could not load necessary modules for IPSEC rules: protocol not supported
INFO[2022-10-24T10:25:18.134140764Z] failed to read ipv6 net.ipv6.conf.<bridge>.accept_ra bridge=docker0 syspath=/proc/sys/net/ipv6/conf/docker0/accept_ra
INFO[2022-10-24T10:25:18.134286940Z] failed to read ipv6 net.ipv6.conf.<bridge>.accept_ra bridge=docker0 syspath=/proc/sys/net/ipv6/conf/docker0/accept_ra
INFO[2022-10-24T10:25:19.134311260Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2022-10-24T10:25:19.134814300Z] failed to read ipv6 net.ipv6.conf.<bridge>.accept_ra bridge=docker0 syspath=/proc/sys/net/ipv6/conf/docker0/accept_ra
INFO[2022-10-24T10:25:19.848769116Z] Loading containers: done.
INFO[2022-10-24T10:25:20.034106972Z] Docker daemon commit=459d0df graphdriver(s)=overlay2 version=20.10.12
INFO[2022-10-24T10:25:20.035414364Z] Daemon has completed initialization
INFO[2022-10-24T10:25:20.166991708Z] API listen on /var/run/docker.sock
docker-compose exec docker sh
# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?