It’s important to understand that the docker run command encapsulates a number of commands from an API perspective:
- pull image (if not available locally)
- create container
- attached to the container
- launches container
So far, docker run -d is the same as above, but without the attach step.
Therefore, you need to create and run your container using the remote API.
If the container is still disconnecting immediately, use docker logs <container id> to check for errors. The problem can have nothing to do with detach .
juliaaano
source share