Merge pull request #443 from BenHall/build

Build runC binary via a Docker container
This commit is contained in:
Alexander Morozov 2016-02-26 20:17:31 -08:00
commit 4a12ff6e58
2 changed files with 13 additions and 0 deletions

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM runc_test
ADD . /go/src/github.com/opencontainers/runc
RUN make

View File

@ -1,9 +1,14 @@
RUNC_IMAGE=runc_dev
RUNC_TEST_IMAGE=runc_test
PROJECT=github.com/opencontainers/runc
TEST_DOCKERFILE=script/test_Dockerfile
BUILDTAGS=seccomp
RUNC_BUILD_PATH=/go/src/github.com/opencontainers/runc/runc
RUNC_INSTANCE=runc_dev
export GOPATH:=$(CURDIR)/Godeps/_workspace:$(GOPATH)
.PHONY=dbuild
all:
ln -sfn $(CURDIR) $(CURDIR)/Godeps/_workspace/src/github.com/opencontainers/runc
go build -tags "$(BUILDTAGS)" -o runc .
@ -27,6 +32,11 @@ test: runctestimage
localtest:
go test -tags "$(BUILDTAGS)" ${TESTFLAGS} -v ./...
dbuild: runctestimage
docker build -t $(RUNC_IMAGE) .
docker create --name=$(RUNC_INSTANCE) $(RUNC_IMAGE)
docker cp $(RUNC_INSTANCE):$(RUNC_BUILD_PATH) .
docker rm $(RUNC_INSTANCE)
install:
cp runc /usr/local/bin/runc