Files
speckle-server/utils/monitor-deployment/Dockerfile
T
github-actions[bot] 36f749b24a chore(deps): bump image digests (#1939)
* fix(github action): use correct format for author & committer git signing

* Update image digests

Signed-off-by: specklebot <devops@speckle.systems>

---------

Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: specklebot <devops@speckle.systems>
2024-01-05 15:57:25 +00:00

34 lines
1.1 KiB
Docker

FROM debian:12-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340 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:27d2d6afcfb109e4c147449d4af957f71cb770196527d0da1d1d92b9680b0daa 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"]