Editing Docker start configuration behavior and restart policy
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 16: | Line 16: | ||
:If the container is started with “--rm” flag, you cannot update the restart policy for it. The AutoRemove and RestartPolicy are mutually exclusive for the container. | :If the container is started with “--rm” flag, you cannot update the restart policy for it. The AutoRemove and RestartPolicy are mutually exclusive for the container. | ||
− | |||
− | |||
− | docker update --restart=no $(docker container ls -aq) | + | <code>[[docker inspect]] -f "{{ .HostConfig.RestartPolicy }}" CONTAINER_NAME</code> |
+ | |||
+ | [[docker update]] [[--restart]]=no $(docker container ls -aq) | ||
docker inspect -f "{{ .HostConfig.RestartPolicy}}" $(docker ps -a -q) | docker inspect -f "{{ .HostConfig.RestartPolicy}}" $(docker ps -a -q) | ||
− | |||
== Related commands == | == Related commands == | ||
Line 31: | Line 30: | ||
* <code>[[docker ps]]</code> | * <code>[[docker ps]]</code> | ||
* <code>[[docker start]]</code> | * <code>[[docker start]]</code> | ||
− | |||
− | |||
== See also == | == See also == |
Advertising: