From eef069778b020e02d36c546ce9c92894254a75aa Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Thu, 5 Dec 2019 20:54:13 -0500 Subject: Build runsc in Docker container This removes the build dependency on Bazel. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile') 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/ -- cgit v1.2.3