-
Notifications
You must be signed in to change notification settings - Fork 300
/
Dockerfile.arm64
35 lines (26 loc) · 1.06 KB
/
Dockerfile.arm64
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
26
27
28
29
30
31
32
33
34
35
FROM python:3.9-alpine
LABEL description="Damn Vulnerable GraphQL Application"
LABEL github="https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application"
LABEL maintainers="Dolev Farhi & Connor McKinnon & Nick Aleks"
ARG TARGET_FOLDER=/opt/dvga
WORKDIR $TARGET_FOLDER/
RUN apk add --virtual build-deps file make curl gcc musl-dev libffi-dev g++
RUN adduser -D dvga
RUN chown dvga. $TARGET_FOLDER/
USER dvga
RUN python -m venv venv
RUN source venv/bin/activate
RUN pip3 install --upgrade pip --no-warn-script-location --disable-pip-version-check
ADD --chown=dvga:dvga core /opt/dvga/core
ADD --chown=dvga:dvga db /opt/dvga/db
ADD --chown=dvga:dvga static /opt/dvga/static
ADD --chown=dvga:dvga templates /opt/dvga/templates
COPY --chown=dvga:dvga app.py /opt/dvga
COPY --chown=dvga:dvga config.py /opt/dvga
COPY --chown=dvga:dvga setup.py /opt/dvga/
COPY --chown=dvga:dvga version.py /opt/dvga/
COPY --chown=dvga:dvga requirements.txt /opt/dvga/
RUN pip3 install -r requirements.txt --user --no-warn-script-location
RUN python setup.py
EXPOSE 5013/tcp
CMD ["python", "app.py"]