Merging upstream version 0.15.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
bfebc2a0f4
commit
0a0cb7f4fd
103 changed files with 79620 additions and 742 deletions
28
Dockerfile
28
Dockerfile
|
@ -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" ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue