Explorar o código

Merge pull request #25229 from bboreham/multi-unix-sockets

Fix Upstart post-start script when using multiple Unix sockets
Vincent Demeester %!s(int64=9) %!d(string=hai) anos
pai
achega
016c0076ee
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      contrib/init/upstart/docker.conf

+ 1 - 1
contrib/init/upstart/docker.conf

@@ -58,7 +58,7 @@ post-start script
 	if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then
 	if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then
 		DOCKER_SOCKET=/var/run/docker.sock
 		DOCKER_SOCKET=/var/run/docker.sock
 	else
 	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
 	fi
 
 
 	if [ -n "$DOCKER_SOCKET" ]; then
 	if [ -n "$DOCKER_SOCKET" ]; then