1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-07 22:35:36 +00:00

Builtkit package cache

This commit is contained in:
Petr Stribny 2022-04-27 12:51:35 +00:00
parent ee3d1161b3
commit dd61331f69

View file

@ -1,3 +1,4 @@
# syntax = docker/dockerfile:1.3
FROM debian:buster-slim as base
ARG UID
@ -41,15 +42,17 @@ COPY --chown=$UID:$GID ./backend/docker/mime.types /etc/
COPY --chown=$UID:$GID ./backend/requirements/base.txt /baserow/requirements/
RUN python3 -m pip install --no-cache-dir --no-warn-script-location --disable-pip-version-check --upgrade pip==22.0.3
RUN python3 -m pip install --no-cache-dir --no-warn-script-location --upgrade virtualenv==20.13.1 && python3 -m virtualenv /baserow/venv
# hadolint ignore=SC1091
RUN . /baserow/venv/bin/activate && pip3 install --no-cache-dir -r /baserow/requirements/base.txt
ENV PIP_CACHE_DIR=/tmp/baserow_pip_cache
# hadolint ignore=SC1091,DL3042
RUN --mount=type=cache,mode=777,target=$PIP_CACHE_DIR,uid=$UID,gid=$GID . /baserow/venv/bin/activate && pip3 install -r /baserow/requirements/base.txt
# Build a dev_deps stage which also has the dev dependencies for use by the dev layer.
FROM base as dev_deps
COPY ./backend/requirements/dev.txt /baserow/requirements/
# hadolint ignore=SC1091
RUN . /baserow/venv/bin/activate && pip3 install --no-cache-dir -r /baserow/requirements/dev.txt
# hadolint ignore=SC1091,DL3042
RUN --mount=type=cache,mode=777,target=$PIP_CACHE_DIR,uid=$UID,gid=$GID . /baserow/venv/bin/activate && pip3 install -r /baserow/requirements/dev.txt
# The core stage contains all of Baserows source code and sets up the entrypoint
FROM base as core