When I create containers I\'m specifying a restart policy, but this is not shown in docker ps, and it doesn\'t appear any format string shows this either.
docker ps
D
You can get this via docker inspect.
docker inspect
Just the policy name:
docker inspect --format '{{.HostConfig.RestartPolicy.Name}}'
Or the entire policy (including e.g. max retry count):
docker inspect --format '{{json .HostConfig.RestartPolicy}}'