aboutsummaryrefslogtreecommitdiffstats
path: root/docker/base.Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docker/base.Dockerfile')
-rw-r--r--docker/base.Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile
new file mode 100644
index 0000000..ad2b7a1
--- /dev/null
+++ b/docker/base.Dockerfile
@@ -0,0 +1,23 @@
+FROM python:3.6-alpine3.7
+
+RUN apk add --no-cache libstdc++ protobuf
+RUN apk add --update build-base
+
+ENV PIPENV_VENV_IN_PROJECT=1
+ENV PIPENV_IGNORE_VIRTUALENVS=1
+ENV PIPENV_NOSPIN=1
+ENV PIPENV_HIDE_EMOJIS=1
+ENV PYTHONPATH=/snekbox
+
+RUN pip install pipenv
+
+RUN mkdir -p /snekbox
+COPY Pipfile /snekbox
+COPY Pipfile.lock /snekbox
+COPY . /snekbox
+WORKDIR /snekbox
+
+RUN pipenv sync --dev
+
+RUN cp binaries/nsjail2.5-alpine-x86_64 /usr/sbin/nsjail
+RUN chmod +x /usr/sbin/nsjail