Created
February 28, 2023 09:43
-
-
Save SIMULATAN/c92fc86c2912fb5833ffe99cfc25e7d8 to your computer and use it in GitHub Desktop.
Show a list of docker container names and their respective restart policies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps -a --format json | jq -r '.ID' | xargs -I {} 'docker' inspect {} | jq -r '.[] | "\(.Name[1:]): \(.HostConfig.RestartPolicy.Name)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that this requires engine version 23 (later than
a4a734d
)