docker container exits immediately

The solution for “docker container exits immediately” can be found here. The following code will assist you in solving the problem.

$ docker run -d centos:latest sleep infinity
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d651c7a9e0ad centos:latest “sleep infinity” 2 seconds ago Up 2 seconds nervous_visvesvaraya

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in