user2888962
user2888962

Reputation: 41

How to make a running docker container to detached mode?

If I have ran a docker container / docker compose service without -d option, how do I change the running instance to detached mode? Is it possible?

# docker-compose up myservice &
[2] 12345

Upvotes: 2

Views: 1180

Answers (1)

NRS
NRS

Reputation: 29

Docker supports a keyboard combination to gracefully detach from a container. Press Ctrl-P, followed by Ctrl-Q, to detach from your connection.

To change the configuration of a previously created container you can use docker update

docker update [OPTIONS] CONTAINER [CONTAINER...]

Note: The docker update and docker container update commands are not supported for Windows containers.

Upvotes: 2

Related Questions