-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
33 lines (27 loc) · 1.75 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
#checkov:skip=CKV_DOCKER_2
#checkov:skip=CKV_DOCKER_3
#trivy:ignore:AVD-DS-0002
FROM python:3.14.0-slim@sha256:0aecac02dc3d4c5dbb024b753af084cafe41f5416e02193f1ce345d671ec966e
LABEL com.github.actions.name="contributors" \
com.github.actions.description="GitHub Action that given an organization or repository, produces information about the contributors over the specified time period." \
com.github.actions.icon="users" \
com.github.actions.color="green" \
maintainer="@zkoppert" \
org.opencontainers.image.url="https://github.com/github-community-projects/contributors" \
org.opencontainers.image.source="https://github.com/github-community-projects/contributors" \
org.opencontainers.image.documentation="https://github.com/github-community-projects/contributors" \
org.opencontainers.image.vendor="GitHub" \
org.opencontainers.image.description="GitHub Action that given an organization or repository, produces information about the contributors over the specified time period."
WORKDIR /action/workspace
COPY pyproject.toml uv.lock *.py /action/workspace/
COPY --from=ghcr.io/astral-sh/uv:0.10.9@sha256:10902f58a1606787602f303954cea099626a4adb02acbac4c69920fe9d278f82 /uv /uvx /bin/
RUN uv sync --frozen --no-dev --no-editable \
&& apt-get -y update \
&& apt-get -y install --no-install-recommends git=1:2.47.3-0+deb13u1 \
&& rm -rf /var/lib/apt/lists/*
# Add a simple healthcheck to satisfy container scanners
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD python3 -c "import os,sys; sys.exit(0 if os.path.exists('/action/workspace/contributors.py') else 1)"
ENV PYTHONUNBUFFERED=1
CMD ["/action/workspace/contributors.py"]
ENTRYPOINT ["uv", "run", "--no-dev", "--project", "/action/workspace"]