Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Dockerfile and add caches #25

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.8-slim-buster as build
FROM python:3.11.8-slim-bullseye as build

RUN set -x \
&& python3 -m venv /opt/conveyor
Expand All @@ -7,19 +7,25 @@ ENV PATH="/opt/conveyor/bin:${PATH}"

RUN pip --no-cache-dir --disable-pip-version-check install --upgrade pip setuptools wheel

RUN set -x \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -x \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential

COPY requirements.txt /tmp/requirements.txt

RUN set -x && pip --no-cache-dir --disable-pip-version-check install -r /tmp/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip \
set -x \
pip --no-cache-dir --disable-pip-version-check \
install -r /tmp/requirements.txt


FROM python:3.11.8-slim-buster
FROM python:3.11.8-slim-bullseye

ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONPATH /opt/conveyor/src/
ENV PATH="/opt/conveyor/bin:${PATH}"

Expand Down
Loading