cache pip downloads
This commit is contained in:
parent
6a4682edea
commit
0d7615558e
1 changed files with 8 additions and 6 deletions
|
@ -1,12 +1,13 @@
|
||||||
|
# syntax = docker/dockerfile:1.6
|
||||||
FROM python:3-bookworm
|
FROM python:3-bookworm
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
gcc \
|
gcc \
|
||||||
&& \
|
&& \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# create the appropriate directories
|
# create the appropriate directories
|
||||||
ENV APP_HOME=/app
|
ENV APP_HOME=/app
|
||||||
|
@ -16,7 +17,8 @@ WORKDIR $APP_HOME
|
||||||
# copy project
|
# copy project
|
||||||
COPY . $APP_HOME
|
COPY . $APP_HOME
|
||||||
|
|
||||||
RUN pip3 install -r requirements.txt
|
RUN --mount=type=cache,target=/root/.cache \
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue