Adiel
Adiel

Reputation: 1215

Docker over CentOS 8 Fails to start after prev container with systemd ran

Trying to test docker containers over server with CentOS 8.5 Server.

The container has CentOS 7.9 within it.

Entrypoint for it is /usr/sbin/init.

First launch:

docker run --name test --network=host --privileged --cap-add centos7_with_sbin_init

Is passing success.

After that,trying to launch ANY docker image with --network=host fails:

docker run -network=host hello-world

docker: Error response from daemon: failed to create shim: OCI runtime create failed:
container_linux.go:380:
starting container process caused: process_linux.go:402:
getting the final childs pid from pipe caused:
EOF: unknown.
ERRO 0000 error waiting for container: context canceled

I assume the sbin/init entrypoint of the 1st container launched, Some how breaks following container functionality, By some corruption to undelying host docker conf,

Due to differences in systemd versions

On server (centos 8.5):

systemd 239 (239-51.el8_5.2)
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy

On container (centos 7.9):

systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Only by restarting docker & containerd services, I'm able to launch containers with host network again. (until next time i run my custom container..)

Any ideas?? Thanks

Upvotes: 2

Views: 317

Answers (0)

Related Questions