-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# syntax=docker/dockerfile:1
# renovate: datasource=docker depName=ghcr.io/astral-sh/uv versioning=semver
FROM ghcr.io/astral-sh/uv:alpine AS uv
# renovate: datasource=docker depName=python versioning=python
FROM python:alpine AS builder
WORKDIR /build
COPY --from=uv /usr/local/bin/uv /usr/local/bin/uv
COPY --from=uv /usr/local/bin/uvx /usr/local/bin/uvx
COPY pyproject.toml uv.lock README.md LICENSE ./
COPY canfar/ ./canfar/
RUN uv build --wheel --out-dir /dist \
&& uv pip install --prefix=/install /dist/*.whl
# renovate: datasource=docker depName=python versioning=python
FROM python:alpine AS runtime
LABEL org.opencontainers.image.title="CANFAR Python CLI" \
org.opencontainers.image.description="CLI for CANFAR Science Platform" \
org.opencontainers.image.vendor="Canadian Astronomy Data Centre" \
org.opencontainers.image.source="https://github.com/opencadc/canfar" \
org.opencontainers.image.licenses="AGPL-3.0-or-later"
COPY --from=builder /install /usr/local
HEALTHCHECK --interval=1s --timeout=15s --retries=3 --start-period=1s \
CMD ["canfar", "--help"]
CMD ["canfar"]
# Backward-compatible alias used by CI/CD workflows.
FROM runtime AS production