-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 790 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 790 Bytes
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
FROM python:slim-bookworm
ARG VERSION
ARG SEMVER_CORE
ARG COMMIT_SHA
ARG GITHUB_REPO
ARG BUILD_DATE
ENV VERSION=${VERSION}
ENV SEMVER_CORE=${SEMVER_CORE}
ENV COMMIT_SHA=${COMMIT_SHA}
ENV BUILD_DATE=${BUILD_DATE}
ENV GITHUB_REPO=${GITHUB_REPO}
LABEL org.opencontainers.image.source=${GITHUB_REPO}
LABEL org.opencontainers.image.created=${BUILD_DATE}
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.revision=${COMMIT_SHA}
RUN set -e \
&& useradd -ms /bin/bash -d /app app
WORKDIR /app
USER app
ENV PATH="$PATH:/app/.local/bin/"
COPY requirements.txt /app/
RUN set -e \
&& pip install --no-cache-dir -r /app/requirements.txt --break-system-packages \
&& opentelemetry-bootstrap -a install
COPY --chown=app:app . /app/
CMD ["/app/run.sh"]