feat(ci): add Dockerfile and update CI configuration for DAST
Signed-off-by: Klagarge <remi@heredero.ch>
This commit is contained in:
31
src/Dockerfile
Normal file
31
src/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM python:3.10-slim
|
||||
LABEL org.opencontainers.image.authors="remi.heredero@hevs.ch"
|
||||
|
||||
RUN apt-get update && \
|
||||
pip install --no-cache-dir -U pdm && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
ENV PATH="/root/.local/bin:$PATH" \
|
||||
PDM_USE_VENV=false
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/pyproject.toml src/pdm.lock ./
|
||||
|
||||
RUN pdm config python.use_venv false && \
|
||||
pdm install
|
||||
|
||||
ENV PYTHONPATH="/app/__pypackages__/3.9/lib" \
|
||||
PATH="/app/__pypackages__/3.9/bin:$PATH"
|
||||
|
||||
############################################################
|
||||
# Everything above should be imported from the test image, #
|
||||
# but GitLab can't pull it, so I copy-paste the content #
|
||||
############################################################
|
||||
|
||||
COPY src ./
|
||||
|
||||
ENV FLASK_RUN_HOST=0.0.0.0
|
||||
|
||||
CMD ["pdm", "run", "flask"]
|
Reference in New Issue
Block a user