Skip to content

Commit

Permalink
Mount minikube volume to docker container (#3261)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrdaley authored and aledbf committed Oct 19, 2018
1 parent 091c914 commit 99aff4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/go-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ NODE_IP=${NODE_IP:-127.0.0.1}
SLOW_E2E_THRESHOLD=${SLOW_E2E_THRESHOLD:-40}
EOF

MINIKUBE_PATH=${HOME}/.minikube
MINIKUBE_VOLUME="-v ${MINIKUBE_PATH}:${MINIKUBE_PATH}"
if [ ! -d ${MINIKUBE_PATH} ]; then
echo "Minikube directory not found! Volume will be excluded from docker build."
MINIKUBE_VOLUME=""
fi

docker run \
--tty \
--rm \
Expand All @@ -72,6 +79,7 @@ docker run \
-v ${PWD}:/go/src/${PKG} \
-v ${PWD}/.gocache:${HOME}/.cache/go-build \
-v ${PWD}/bin/${ARCH}:/go/bin/linux_${ARCH} \
${MINIKUBE_VOLUME} \
-w /go/src/${PKG} \
--env-file .env \
--entrypoint ${FLAGS} \
Expand Down

0 comments on commit 99aff4a

Please sign in to comment.