mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
Merge pull request #477 from weaveworks/backend-build-container
Backend build container
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -52,4 +52,3 @@ experimental/_integration/_integration
|
||||
*sublime-project
|
||||
*sublime-workspace
|
||||
*npm-debug.log
|
||||
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: all deps static clean client-lint client-test client-sync
|
||||
.PHONY: all deps static clean client-lint client-test client-sync backend
|
||||
|
||||
# If you can use Docker without being root, you can `make SUDO= <target>`
|
||||
SUDO=sudo
|
||||
@@ -11,6 +11,7 @@ SCOPE_IMAGE=$(DOCKERHUB_USER)/scope
|
||||
SCOPE_EXPORT=scope.tar
|
||||
SCOPE_UI_BUILD_EXPORT=scope_ui_build.tar
|
||||
SCOPE_UI_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-ui-build
|
||||
SCOPE_BACKEND_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-backend-build
|
||||
SCOPE_VERSION=$(shell git rev-parse --short HEAD)
|
||||
DOCKER_VERSION=1.3.1
|
||||
DOCKER_DISTRIB=docker/docker-$(DOCKER_VERSION).tgz
|
||||
@@ -76,6 +77,10 @@ $(SCOPE_UI_BUILD_EXPORT): client/Dockerfile client/package.json client/webpack.l
|
||||
docker build -t $(SCOPE_UI_BUILD_IMAGE) client
|
||||
docker save $(SCOPE_UI_BUILD_IMAGE):latest > $@
|
||||
|
||||
backend:
|
||||
docker build -t $(SCOPE_BACKEND_BUILD_IMAGE) backend
|
||||
docker run -ti -v $(shell pwd):/go/src/github.com/weaveworks/scope $(SCOPE_BACKEND_BUILD_IMAGE) /build.bash
|
||||
|
||||
clean:
|
||||
go clean ./...
|
||||
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_EXPORT) $(APP_EXE) $(PROBE_EXE) client/build/app.js
|
||||
|
||||
4
backend/Dockerfile
Normal file
4
backend/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM golang:1.5.1
|
||||
RUN apt-get update && apt-get install -y libpcap-dev
|
||||
COPY build.bash /
|
||||
|
||||
12
backend/build.bash
Executable file
12
backend/build.bash
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Mount the scope repo:
|
||||
# -v $(pwd):/go/src/github.com/weaveworks/scope
|
||||
|
||||
cd /go/src/github.com/weaveworks/scope
|
||||
make deps
|
||||
make app/scope-app
|
||||
make probe/scope-probe
|
||||
|
||||
Reference in New Issue
Block a user