-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from danieldavidson/dockerfile-arm64
feat: Add Dockerfile for ARM-based Macs
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters