1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Improved Containerfile

This commit is contained in:
krateng 2022-04-08 17:23:56 +02:00
parent 0f59ffb288
commit 28ba7b6ad0
4 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,7 @@
*
!/maloja
!Dockerfile
!Containerfile
!/requirements_pre.txt
!/requirements.txt
!/pyproject.toml
!/README.md

View File

@ -15,6 +15,16 @@ RUN \
apk add py3-pip && \
pip install wheel
# these are more static than the real requirements, which means caching
COPY ./requirements_pre.txt ./requirements_pre.txt
RUN \
apk add --no-cache --virtual .build-deps gcc g++ python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers && \
pip install --no-cache-dir -r requirements_pre.txt && \
apk del .build-deps
# less likely to be cached
COPY ./requirements.txt ./requirements.txt
RUN \

View File

@ -15,6 +15,16 @@ RUN \
apk add py3-pip && \
pip install wheel
# these are more static than the real requirements, which means caching
COPY ./requirements_pre.txt ./requirements_pre.txt
RUN \
apk add --no-cache --virtual .build-deps {{ tool.osreqs.alpine.build | join(' ') }} && \
pip install --no-cache-dir -r requirements_pre.txt && \
apk del .build-deps
# less likely to be cached
COPY ./requirements.txt ./requirements.txt
RUN \

3
requirements_pre.txt Normal file
View File

@ -0,0 +1,3 @@
# this is a more static file that enables container images to be cached
# it should contain packages that take long to build and don't change frequently
lxml