Skip to content

Commit

Permalink
Don't use *PATH* env vars in docker environment
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
  • Loading branch information
ANeumann82 committed May 29, 2020
1 parent 6e3ac9a commit 957657f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ fi

docker build "${REPO_ROOT}/tools" -t kudo-cassandra-tools

docker run --rm -u "$(id -u):$(id -g)" --env-file <(env) -v "${REPO_ROOT}:${REPO_ROOT}" -w "$(pwd)" kudo-cassandra-tools "$@"

# Run docker and copy all ENV vars except any that contain PATH
docker run --rm -u "$(id -u):$(id -g)" --env-file <(env | grep -v "PATH") -v "${REPO_ROOT}:${REPO_ROOT}" -w "$(pwd)" kudo-cassandra-tools "$@"

0 comments on commit 957657f

Please sign in to comment.