added fixes for make dev-env (#8804)
This commit is contained in:
parent
4c6a7ee158
commit
0cc43d5e52
3 changed files with 5 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -54,8 +54,9 @@ ifneq ($(PLATFORM),)
|
|||
endif
|
||||
|
||||
MAC_OS = $(shell uname -s)
|
||||
|
||||
ifeq ($(MAC_OS), Darwin)
|
||||
MAC_DOCKER_FLAGS="--load"
|
||||
MAC_DOCKER_FLAGS=
|
||||
else
|
||||
MAC_DOCKER_FLAGS=
|
||||
endif
|
||||
|
|
|
@ -49,6 +49,7 @@ echo "Building targets for ${ARCH}, generated targets in ${TARGETS_DIR} director
|
|||
|
||||
echo "Building ${PKG}/cmd/nginx"
|
||||
|
||||
git config --add safe.directory /go/src/k8s.io/ingress-nginx
|
||||
${GO_BUILD_CMD} \
|
||||
-trimpath -ldflags="-buildid= -w -s \
|
||||
-X ${PKG}/version.RELEASE=${TAG} \
|
||||
|
|
|
@ -65,12 +65,14 @@ fi
|
|||
|
||||
USER=${USER:-nobody}
|
||||
|
||||
MAC_OS="`uname -s`"
|
||||
MAC_OS="${MAC_OS:-}"
|
||||
if [[ ${MAC_OS} == "Darwin" ]]; then
|
||||
MAC_DOCKER_FLAGS=""
|
||||
else
|
||||
MAC_DOCKER_FLAGS="-u $(id -u ${USER}):$(id -g ${USER})" #idk why mac/git fails on the gobuild if these are presented to dockerrun.sh script
|
||||
fi
|
||||
echo "MAC_OS = ${MAC_OS}, MAC_OS_FLAGS = ${MAC_DOCKER_FLAGS}"
|
||||
|
||||
echo "..printing env & other vars to stdout"
|
||||
echo "HOSTNAME=`hostname`"
|
||||
|
|
Loading…
Reference in a new issue