Skip to content

Commit e95cdf2

Browse files
committed
adding curl to make some testing easier and also for healthchecks
1 parent f3a16c2 commit e95cdf2

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM python:3.11-slim AS base_image
22

33
FROM base_image AS builder
44
RUN --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
77
COPY getmarcapi /src/getmarcapi/
88
COPY src /src/src/
99
WORKDIR /src
@@ -16,9 +16,16 @@ ARG PIP_INDEX_URL
1616
ARG PIP_EXTRA_INDEX_URL
1717
COPY pyproject.toml uv.lock README.rst README.md setup.py MANIFEST.in /src/
1818
RUN python -m pip install --disable-pip-version-check uv && \
19-
uv build --wheel --out-dir /wheels
19+
uv build --wheel --out-dir /wheels
2020

2121
FROM 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+
2229
COPY --from=builder /wheels/*.whl /wheels/
2330
WORKDIR /app
2431
COPY pyproject.toml uv.lock README.rst /app/
@@ -27,10 +34,10 @@ ARG UV_INDEX_URL
2734
ARG UV_CACHE_DIR=/.cache/uv
2835
ARG UV_EXTRA_INDEX_URL
2936
RUN --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
3441
EXPOSE 5000
3542
COPY api.cfg /app/settings.cfg
3643
ENV GETMARCAPI_SETTINGS=/app/settings.cfg

0 commit comments

Comments
 (0)