Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Dockerfile 1.13 KiB
# Can be "development" or "production"
ARG ENV_TYPE
ARG GIT_COMMIT_SHA
FROM registry.git.fsmpi.rwth-aachen.de/videoag/backend/${ENV_TYPE}_common_py:${GIT_COMMIT_SHA}
ARG PIP_CACHE_DIR
ENV VIDEOAG_API_GIT_COMMIT_HASH $GIT_COMMIT_SHA
RUN ls -la /builds/videoag/backend/.cache/pip
COPY extra_requirements.txt ./
RUN --mount=type=cache,target=/root/.cache/pip \
pip3 install -r extra_requirements.txt
COPY docker_start.sh ./
COPY .pylintrc ./
COPY tests/ ./tests/
COPY config/api_example_config.py ./config/
COPY config/test_config_override.py ./config/
COPY config/uwsgi_example.ini ./config/
COPY config/db_test_data.sql ./config/
# The source has a symlink file at src/videoag_common
# The actual files are already in the image at src/videoag_common
# So we move the actual files temporarily, copy the src directory, remove the symlink and move the actual files back
# In the future, COPY --exclude src/videoag_common might work (but right now it doesn't, some "failed to compute cache key")
RUN mv src/videoag_common src/.temp
COPY src/ ./src/
RUN rm src/videoag_common
RUN mv src/.temp src/videoag_common
ENTRYPOINT ["/code/docker_start.sh"]