1
0

Use CONTAINER_ID instead of HOSTNAME variable when using docker_api

This commit is contained in:
Yves Blusseau 2017-02-13 19:11:53 +01:00
parent b002a6bfa5
commit 86ee8793a4

@ -47,7 +47,7 @@ function get_nginx_proxy_cid {
function check_writable_directory {
local dir="$1"
docker_api "/containers/$HOSTNAME/json" | jq ".Mounts[].Destination" | grep -q "^\"$dir\"$"
docker_api "/containers/$CONTAINER_ID/json" | jq ".Mounts[].Destination" | grep -q "^\"$dir\"$"
if [[ $? -ne 0 ]]; then
echo "Warning: '$dir' does not appear to be a mounted volume."
fi