Files
speckle-server/utils/monitor-deployment/Dockerfile
T
github-actions[bot] 11b62f3824 Update image digests (#2189)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-04-09 10:05:32 +01:00

34 lines
1.1 KiB
Docker

FROM debian:12-slim@sha256:ccb33c3ac5b02588fc1d9e4fc09b952e433d0c54d8618d0ee1afadf1f3cf2455 AS build-stage
WORKDIR /build
# install tini
ARG TINI_VERSION=v0.19.0
ENV TINI_VERSION=${TINI_VERSION}
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini ./tini
RUN chmod +x ./tini
# Add python virtual env
WORKDIR /venv
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install \
--no-install-suggests --no-install-recommends --yes \
python3-venv=3.11.2-1+b1 && \
python3 -m venv /venv
COPY utils/monitor-deployment/requirements.txt /requirements.txt
RUN /venv/bin/pip install --disable-pip-version-check --requirement /requirements.txt
FROM gcr.io/distroless/python3-debian12:nonroot@sha256:538f54b8d704c29137d337aeac1bfc874afd7db813b163b585366d57ec113e13 as production-stage
ARG PG_CONNECTION_STRING
ARG NODE_EXTRA_CA_CERTS
ENV PG_CONNECTION_STRING=${PG_CONNECTION_STRING} \
NODE_EXTRA_CA_CERTS=${NODE_EXTRA_CA_CERTS}
COPY --from=build-stage /venv /venv
COPY --from=build-stage /build/tini /usr/bin/tini
WORKDIR /app
COPY utils/monitor-deployment .
ENTRYPOINT [ "tini", "--", "/venv/bin/python3", "-u", "src/run.py"]