I am building on WSL-2 linux:vyos-build/docker-vyos [current*]$ uname -a
Linux IN-B999Q13 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I got following image created:
vyos-build/docker-vyos [current*]$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
vyos 1.3-20210628163659 4d3203ef3fea 26 seconds ago 81.3MB
When I run this again:
vyos-build/docker-vyos [current*]$ docker run -v /lib/modules:/lib/modules --name R1 --privileged -d vyos:1.3-20210628163659
9329cd5e653b93363bd77d84e53337f62d938fdf8b0deb2eb32ee6204d19c533docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “/lib/systemd/systemd”: stat /lib/systemd/systemd: no such file or directory: unknown.
though the “docker ps” shows that container is created:
vyos-build/docker-vyos [current*]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES9329cd5e653b vyos:1.3-20210628163659 “/lib/systemd/systemd” 38 seconds ago Created R1
If I restart container again… it throws same error again:
vyos-build/docker-vyos [current*]$ docker restart R10
Error response from daemon: Cannot restart container R10: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “/lib/systemd/systemd”: stat /lib/systemd/systemd: no such file or directory: unknown
vyos-build/docker-vyos [current*]$ docker container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6b9aa8789215 vyos:1.3-20210628165344 “/lib/systemd/systemd” 9 seconds ago Up 8 seconds R10
Is something wrong with debain:buster-slim image ?
The problem exists because of wrong versions of some packages and broken installation as a result. You should see the error message about this on the second build stage and a lot of other errors after. Also as ridiculous small resulting image size.