diff --git a/contrib/init/upstart/docker.conf b/contrib/init/upstart/docker.conf index 29a66de476..d58f7d6ac8 100644 --- a/contrib/init/upstart/docker.conf +++ b/contrib/init/upstart/docker.conf @@ -58,7 +58,7 @@ post-start script if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then DOCKER_SOCKET=/var/run/docker.sock else - DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)') + DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q) fi if [ -n "$DOCKER_SOCKET" ]; then