docker run -ti is problematic for automation.

This commit is contained in:
Tom Wilkie
2015-10-29 14:15:39 +00:00
parent 7dad389dac
commit e0cea0e2b1

View File

@@ -43,7 +43,7 @@ $(PROBE_EXE): probe/*.go probe/docker/*.go probe/kubernetes/*.go probe/endpoint/
ifeq ($(BUILD_IN_CONTAINER),true)
$(APP_EXE) $(PROBE_EXE) $(RUNSVINIT): $(SCOPE_BACKEND_BUILD_UPTODATE)
$(SUDO) docker run -ti $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
$(SUDO) docker run $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
$(SCOPE_BACKEND_BUILD_IMAGE) $@
else
$(APP_EXE) $(PROBE_EXE):
@@ -67,22 +67,22 @@ static: client/build/app.js
ifeq ($(BUILD_IN_CONTAINER),true)
client/build/app.js: $(shell find client/app/scripts -type f)
mkdir -p client/build
$(SUDO) docker run -ti $(RM) -v $(shell pwd)/client/app:/home/weave/app \
$(SUDO) docker run $(RM) -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
$(SCOPE_UI_BUILD_IMAGE) npm run build
client-test: $(shell find client/app/scripts -type f)
$(SUDO) docker run -ti $(RM) -v $(shell pwd)/client/app:/home/weave/app \
$(SUDO) docker run $(RM) -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/test:/home/weave/test \
$(SCOPE_UI_BUILD_IMAGE) npm test
client-lint:
$(SUDO) docker run -ti $(RM) -v $(shell pwd)/client/app:/home/weave/app \
$(SUDO) docker run $(RM) -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/test:/home/weave/test \
$(SCOPE_UI_BUILD_IMAGE) npm run lint
client-start:
$(SUDO) docker run -ti $(RM) --net=host -v $(shell pwd)/client/app:/home/weave/app \
$(SUDO) docker run $(RM) --net=host -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
$(SCOPE_UI_BUILD_IMAGE) npm start
endif
@@ -105,7 +105,7 @@ clean:
ifeq ($(BUILD_IN_CONTAINER),true)
tests:
$(SUDO) docker run -ti $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope \
$(SUDO) docker run $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope \
-e GOARCH -e GOOS -e CIRCLECI --entrypoint=/bin/sh $(SCOPE_BACKEND_BUILD_IMAGE) -c \
"cd /go/src/github.com/weaveworks/scope && ./tools/test -no-go-get"
else