forked from metricq/metricq-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 750 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 750 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
FROM python:3.11-slim-bullseye AS BUILDER
LABEL maintainer="mario.bielert@tu-dresden.de"
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
protobuf-compiler \
build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m metricq
COPY --chown=metricq:metricq . /home/metricq/metricq
WORKDIR /home/metricq/metricq
USER metricq
RUN pip install --user .
FROM python:3.11-slim-bullseye
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libprotobuf23 \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m metricq
WORKDIR /home/metricq/
COPY --from=BUILDER --chown=metricq:metricq /home/metricq/.local /home/metricq/.local
USER metricq