aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2023-03-15 04:49:06 +0400
committerGravatar Hassan Abouelela <[email protected]>2023-03-15 04:49:06 +0400
commit47a9e0d72d5225f9c503775530d4e5f0ff63fe6d (patch)
treedbbe21c54d5ae66215b576ba998fd5dbf2e6f679 /Dockerfile
parentUpdate Sentry SDK to support Falcon 3 (diff)
Add Multi-version Capability
Adds support for having multiple evaluation python versions installed in the docker container. A utility to automatically generate correct dockerfile instructions and nsjail mounts based on the available versions is also included. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 6355dac..015e9d1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-# syntax=docker/dockerfile:1
+# THIS FILE IS AUTOGENERATED, DO NOT MODIFY! #
FROM python:3.11-slim-buster as builder
WORKDIR /nsjail
@@ -20,8 +20,16 @@ RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
RUN make
# ------------------------------------------------------------------------------
+FROM python:3.11-slim-buster as base-first
+
+FROM python:3.10-slim-buster as base-3-10
+COPY --from=base-first / /
+
+# ------------------------------------------------------------------------------
FROM python:3.11-slim-buster as base
+COPY --from=base-3-10 / /
+
# Everything will be a user install to allow snekbox's dependencies to be kept
# separate from the packages exposed during eval.
ENV PATH=/root/.local/bin:$PATH \