summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIan Lewis <ianlewis@google.com>2019-12-05 20:54:13 -0500
committerIan Lewis <ianlewis@google.com>2020-01-14 17:00:07 +0900
commiteef069778b020e02d36c546ce9c92894254a75aa (patch)
tree00493fbcbad98c03f24af1ceb1abc6ccd48e0561
parentafbd4a130b3b49224b8c25a50d2bf1cfadd49ed3 (diff)
Build runsc in Docker container
This removes the build dependency on Bazel.
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 45c115ed9..cb48b4ae2 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,17 @@ node_modules: package.json package-lock.json
$(NPM) ci
upstream/gvisor/bazel-bin/runsc/linux_amd64_pure_stripped/runsc: upstream-gvisor
- cd upstream/gvisor && bazel build runsc
+ mkdir -p /tmp/gvisor-website/build_output
+ docker run \
+ -v $(PWD)/upstream/gvisor:/workspace \
+ -v /tmp/gvisor-website/build_output:/tmp/gvisor-website/build_output \
+ -w /workspace \
+ --entrypoint 'sh' \
+ l.gcr.io/google/bazel \
+ -c '\
+ groupadd --gid $(shell id -g) $(shell id -gn) && \
+ useradd --uid $(shell id -u) --gid $(shell id -g) -ms /bin/bash $(USER) && \
+ su $(USER) -c "bazel --output_user_root=/tmp/gvisor-website/build_output build //runsc"'
bin/generate-syscall-docs: $(GEN_SOURCE)
mkdir -p bin/