@@ -2,8 +2,8 @@ FROM python:3.11-slim AS base_image
22
33FROM base_image AS builder
44RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5- --mount=type=cache,target=/var/lib/apt,sharing=locked \
6- apt update -y && apt install --no-install-recommends -y npm
5+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
6+ apt update -y && apt install --no-install-recommends -y npm
77COPY getmarcapi /src/getmarcapi/
88COPY src /src/src/
99WORKDIR /src
@@ -16,9 +16,16 @@ ARG PIP_INDEX_URL
1616ARG PIP_EXTRA_INDEX_URL
1717COPY pyproject.toml uv.lock README.rst README.md setup.py MANIFEST.in /src/
1818RUN python -m pip install --disable-pip-version-check uv && \
19- uv build --wheel --out-dir /wheels
19+ uv build --wheel --out-dir /wheels
2020
2121FROM base_image
22+
23+ # isntall curl for heatlh checks and testing
24+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
25+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
26+ apt update -y && apt install --no-install-recommends -y curl
27+
28+
2229COPY --from=builder /wheels/*.whl /wheels/
2330WORKDIR /app
2431COPY pyproject.toml uv.lock README.rst /app/
@@ -27,10 +34,10 @@ ARG UV_INDEX_URL
2734ARG UV_CACHE_DIR=/.cache/uv
2835ARG UV_EXTRA_INDEX_URL
2936RUN --mount=type=cache,target=${UV_CACHE_DIR} \
30- python -m venv uv && \
31- ./uv/bin/pip install --disable-pip-version-check uv && \
32- ./uv/bin/uv sync --group deploy --no-dev --no-editable --no-install-project --find-links=/wheels && \
33- ./uv/bin/uv pip install --find-links=/wheels --no-index getmarcapi --no-deps
37+ python -m venv uv && \
38+ ./uv/bin/pip install --disable-pip-version-check uv && \
39+ ./uv/bin/uv sync --group deploy --no-dev --no-editable --no-install-project --find-links=/wheels && \
40+ ./uv/bin/uv pip install --find-links=/wheels --no-index getmarcapi --no-deps
3441EXPOSE 5000
3542COPY api.cfg /app/settings.cfg
3643ENV GETMARCAPI_SETTINGS=/app/settings.cfg
0 commit comments