Tweak the kubectl script to make running the proxy easy

This commit is contained in:
R. Tyler Croy 2017-09-09 11:04:11 -07:00
parent 1f1a710f8f
commit 5d8ec6d44e
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 5 additions and 1 deletions

View File

@ -16,10 +16,14 @@ if [ $? -ne 0 ]; then
pull_container
fi;
if [ "${1}" = "proxy" ]; then
PROXY_ARGS="-p 8001:8001";
fi;
# http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html
# Passing LOGNAME and USER because the acs component in the azure-cli does some
# user lookup
exec docker run --rm -u $(id -u):$(id -g) \
exec docker run --rm -u $(id -u):$(id -g) ${PROXY_ARGS} \
-v ${PWD}/.kube:/.kube \
-v ${REPO_DIR}/ssh_key:/.ssh \
-e LOGNAME=$LOGNAME \