mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
containerize build of prog/static.go
This commit is contained in:
16
Makefile
16
Makefile
@@ -82,9 +82,6 @@ endif
|
||||
|
||||
static: prog/static.go
|
||||
|
||||
prog/static.go: client/build/app.js
|
||||
esc -o $@ -prefix client/build client/build
|
||||
|
||||
ifeq ($(BUILD_IN_CONTAINER),true)
|
||||
client/build/app.js: $(shell find client/app/scripts -type f) $(SCOPE_UI_BUILD_UPTODATE)
|
||||
mkdir -p client/build
|
||||
@@ -106,9 +103,21 @@ client-start: $(SCOPE_UI_BUILD_UPTODATE)
|
||||
$(SUDO) docker run $(RM) $(RUN_FLAGS) --net=host -v $(shell pwd)/client/app:/home/weave/app \
|
||||
-v $(shell pwd)/client/build:/home/weave/build \
|
||||
$(SCOPE_UI_BUILD_IMAGE) npm start
|
||||
|
||||
prog/static.go: client/build/app.js $(SCOPE_BACKEND_BUILD_UPTODATE)
|
||||
$(SUDO) docker run $(RM) $(RUN_FLAGS) --net=host \
|
||||
-v $(shell pwd):/go/src/github.com/weaveworks/scope \
|
||||
-v $(shell pwd)/.pkg:/go/pkg \
|
||||
-w /go/src/github.com/weaveworks/scope \
|
||||
--entrypoint=make \
|
||||
$(SCOPE_BACKEND_BUILD_IMAGE) BUILD_IN_CONTAINER=false prog/static.go
|
||||
|
||||
else
|
||||
client/build/app.js:
|
||||
cd client && npm run build
|
||||
|
||||
prog/static.go: client/build/app.js
|
||||
esc -o $@ -prefix client/build client/build
|
||||
endif
|
||||
|
||||
$(SCOPE_UI_BUILD_UPTODATE): client/Dockerfile client/package.json client/webpack.local.config.js client/webpack.production.config.js client/server.js client/.eslintrc
|
||||
@@ -129,5 +138,4 @@ deps:
|
||||
$(GO) get -u -f -tags netgo \
|
||||
github.com/FiloSottile/gvt \
|
||||
github.com/mattn/goveralls \
|
||||
github.com/mjibson/esc \
|
||||
github.com/weaveworks/github-release
|
||||
|
||||
@@ -3,8 +3,9 @@ ENV GO15VENDOREXPERIMENT 1
|
||||
RUN apt-get update && apt-get install -y libpcap-dev python-requests time
|
||||
RUN go clean -i net && go install -tags netgo std && go install -race -tags netgo std
|
||||
RUN go get -tags netgo \
|
||||
github.com/golang/lint/golint \
|
||||
github.com/fzipp/gocyclo \
|
||||
github.com/kisielk/errcheck
|
||||
github.com/golang/lint/golint \
|
||||
github.com/kisielk/errcheck \
|
||||
github.com/mjibson/esc
|
||||
COPY build.sh /
|
||||
ENTRYPOINT ["/build.sh"]
|
||||
|
||||
Reference in New Issue
Block a user