From a160036ba2a2a90e8d7f3d9b69e29a8a2494184d Mon Sep 17 00:00:00 2001 From: James Fielder Date: Mon, 9 Oct 2017 11:03:39 +0100 Subject: [PATCH] Fix issue where container name issue Fix issue where docker swarm names are incorrectly generated when project option is set. --- docker-entrypoint | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint b/docker-entrypoint index e4ca754..957170e 100755 --- a/docker-entrypoint +++ b/docker-entrypoint @@ -49,7 +49,7 @@ cat << EOF > ${HOME_DIR}/projects/${SCRIPT_NAME}.sh #!/usr/bin/env bash set -e -CONTAINERS=\$(docker ps --format '{{.Names}}' | grep -E "^${PROJECT}_${CONTAINER}_[0-9]+") +CONTAINERS=\$(docker ps --format '{{.Names}}' | grep -E "^${PROJECT}_${CONTAINER}.[0-9]+") for CONTAINER_NAME in \$CONTAINERS; do docker exec ${DOCKERARGS} \${CONTAINER_NAME} ${TMP_COMMAND} done @@ -213,4 +213,4 @@ if [ "$1" = "crond" ]; then fi echo "$@" -exec "$@" \ No newline at end of file +exec "$@"