Indeed, the remote API does not have a 'detach' mode as the 'attach' mode is an extra endpoint.
If you want to run in detach mode with the remote API, simply create and start your container without attaching to it.
If the container still shuts down immediately, use docker logs <container id>
to check for errors. The problem might have nothing to do with detach
.