mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Improved Containerfile
This commit is contained in:
parent
0f59ffb288
commit
28ba7b6ad0
@ -1,6 +1,7 @@
|
|||||||
*
|
*
|
||||||
!/maloja
|
!/maloja
|
||||||
!Dockerfile
|
!Containerfile
|
||||||
|
!/requirements_pre.txt
|
||||||
!/requirements.txt
|
!/requirements.txt
|
||||||
!/pyproject.toml
|
!/pyproject.toml
|
||||||
!/README.md
|
!/README.md
|
||||||
|
@ -15,6 +15,16 @@ RUN \
|
|||||||
apk add py3-pip && \
|
apk add py3-pip && \
|
||||||
pip install wheel
|
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
|
COPY ./requirements.txt ./requirements.txt
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
@ -15,6 +15,16 @@ RUN \
|
|||||||
apk add py3-pip && \
|
apk add py3-pip && \
|
||||||
pip install wheel
|
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
|
COPY ./requirements.txt ./requirements.txt
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
3
requirements_pre.txt
Normal file
3
requirements_pre.txt
Normal 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
|
Loading…
Reference in New Issue
Block a user