summary refs log tree commit diff
path: root/docker
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2020-02-18 10:31:20 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-19 01:05:34 +0000
commit2dae56768c0dcfb57ff07c051f5785162632073e (patch)
tree06f8a2f76a8a3f83aa9e78ca9062e08d4cae1424 /docker
parent1ba620d8219cbda05ca170ad8ffefa76d6bb72d4 (diff)
downloadcrosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar.gz
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar.bz2
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar.lz
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar.xz
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.tar.zst
crosvm-2dae56768c0dcfb57ff07c051f5785162632073e.zip
docker: check out minijail in expected location
Move the minijail source checkout location in the Dockerfile so that it
is in the expected place relative to the crosvm checkout so that Docker
(and kokoro) can successfully find it.

Also update Cargo.lock for the new minijail-sys dependency; this fixes
"read-only filesystem" errors from cargo running inside Docker when it
tries to write the updated Cargo.lock.

BUG=None
TEST=docker/build_crosvm_base.sh && docker/wrapped_smoke_test.sh

Change-Id: Ic399030004c2c4891a03a60474348b0bed9f01d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2062675
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile14
1 files changed, 8 insertions, 6 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 41d755a..fecc31d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -59,12 +59,6 @@ RUN cargo install thisiznotarealpackage -q || true
 # Used /scratch for building dependencies which are too new or don't exist on Debian stretch.
 WORKDIR /scratch
 
-# minijail does not exist in upstream linux distros.
-RUN git clone https://android.googlesource.com/platform/external/minijail \
-    && cd minijail \
-    && make -j$(nproc) \
-    && cp libminijail.so /usr/lib/x86_64-linux-gnu/
-
 # New libepoxy and libdrm-dev requires newer meson than is in Debian stretch.
 ARG MESON_COMMIT=master
 RUN git clone https://github.com/mesonbuild/meson \
@@ -147,6 +141,14 @@ ENV THIRD_PARTY_ROOT=$CROS_ROOT/third_party
 RUN mkdir -p $THIRD_PARTY_ROOT
 ENV PLATFORM_ROOT=$CROS_ROOT/platform
 RUN mkdir -p $PLATFORM_ROOT
+ENV AOSP_EXTERNAL_ROOT=$CROS_ROOT/aosp/external
+RUN mkdir -p $AOSP_EXTERNAL_ROOT
+
+# minijail does not exist in upstream linux distros.
+RUN git clone https://android.googlesource.com/platform/external/minijail $AOSP_EXTERNAL_ROOT/minijail \
+    && cd $AOSP_EXTERNAL_ROOT/minijail \
+    && make -j$(nproc) \
+    && cp libminijail.so /usr/lib/x86_64-linux-gnu/
 
 # Pull the cras library for audio access.
 ARG ADHD_COMMIT=master