Skip to content

Commit

Permalink
Install git in runtime container (#446)
Browse files Browse the repository at this point in the history
This is required for installing python packages at runtime.

It was previously present in the non-slim python container used before
but this was accidentally removed with the switch to the copier
template.

Fixes #445.
  • Loading branch information
joeshannon authored May 1, 2024
1 parent 0a634dc commit 25e9028
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ RUN pip install .
# The runtime stage copies the built venv into a slim runtime container
FROM python:${PYTHON_VERSION}-slim as runtime
# Add apt-get system dependecies for runtime here if needed
RUN apt-get update && apt-get install -y --no-install-recommends \
# Git required for installing packages at runtime
git \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /venv/ /venv/
COPY ./container-startup.sh /container-startup.sh
ENV PATH=/venv/bin:$PATH
Expand Down

0 comments on commit 25e9028

Please sign in to comment.