aboutsummaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
blob: 2c707a1969c2067fce5c4384e2a36db7b2c93c26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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

RUN cp binaries/nsjail2.5-alpine-x86_64 /usr/sbin/nsjail
RUN chmod +x /usr/sbin/nsjail

CMD ["pipenv", "run", "snekbox"]