Skip to content

Commit

Permalink
Check for docker-squash and the correct netgo libs in the makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Wilkie committed May 26, 2015
1 parent 92adbf1 commit 07eeb8f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@ SCOPE_UI_BUILD_EXPORT=scope_ui_build.tar
SCOPE_UI_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-ui-build
GIT_REVISION=$(shell git rev-parse HEAD)

ifeq ("$(DOCKER_SQUASH)","")
$(error Please install docker-squash by running 'make dep')
endif

all: $(SCOPE_EXPORT)

$(SCOPE_EXPORT): $(APP_EXE) $(PROBE_EXE) docker/*
cp $(APP_EXE) $(PROBE_EXE) docker/
$(SUDO) docker build -t $(SCOPE_IMAGE) docker/
$(SUDO) docker save $(SCOPE_IMAGE):latest | $(SUDO) $(DOCKER_SQUASH) -t $(SCOPE_IMAGE) | tee $@ | $(SUDO) docker load
$(SUDO) docker save $(SCOPE_IMAGE):latest | sudo $(DOCKER_SQUASH) -t $(SCOPE_IMAGE) | tee $@ | $(SUDO) docker load
@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
rm $@; \
echo "\nYour go standard library was built without the 'netgo' build tag."; \
echo "To fix that, run"; \
echo " sudo go clean -i net"; \
echo " sudo go install -tags netgo std"; \
false; \
}

$(APP_EXE): app/*.go report/*.go xfer/*.go

Expand Down

0 comments on commit 07eeb8f

Please # to comment.