Updating constraints on a running container

As with the restart policies, the constraints can also be updated when the container is already running. This may be helpful, if you see your containers eating too much of the Docker host system resources and would like to limit this usage. Again, we use the docker update command to do this.

As with restart policies, the syntax for the docker update command will be the same as when starting the container, you specify the desired constraints as an argument for the docker update command and then give the container ID (taken from the docker ps command output for example) or its name. Again, if you would like to change the constraints on more than one container at once, just provide their IDs or names ...

Get Docker and Kubernetes for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.