Adding upstream version 0.15.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 11:39:42 +01:00
parent 6721599912
commit a1777afd4b
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
103 changed files with 79620 additions and 742 deletions

View file

@ -3,23 +3,30 @@ ARG IMG_OPTION=alpine
### BUILDER
FROM python:${PYTHON_VER}-${IMG_OPTION} as BUILDER
FROM python:${PYTHON_VER}-${IMG_OPTION} AS BUILDER
RUN pip install --upgrade pip
WORKDIR /local
COPY . /local
ENV PYTHONPATH=/local
ENV PATH=$PATH:/root/.local/bin
RUN python -m venv /opt/venv
RUN pip --no-cache-dir install --user .
ENV PATH="/opt/venv/bin:$PATH"
RUN apk add --no-cache build-base # Add build-base package
RUN pip --no-cache-dir install "." &&\
pip --no-cache-dir install ".[cli]"
# ----------------------------------- #
### BASE
FROM python:${PYTHON_VER}-${IMG_OPTION} as BASE
FROM python:${PYTHON_VER}-${IMG_OPTION} AS BASE
# Add a system user
RUN adduser --system anta
# Opencontainer labels
# Labels version and revision will be updating
@ -40,7 +47,12 @@ LABEL "org.opencontainers.image.title"="anta" \
"org.opencontainers.image.revision"="dev" \
"org.opencontainers.image.version"="dev"
COPY --from=BUILDER /root/.local/ /root/.local
ENV PATH=$PATH:/root/.local/bin
# Copy artifacts from builder
COPY --from=BUILDER /opt/venv /opt/venv
ENTRYPOINT [ "/root/.local/bin/anta" ]
# Define PATH and default user
ENV PATH="/opt/venv/bin:$PATH"
USER anta
ENTRYPOINT [ "/opt/venv/bin/anta" ]