Debian Codegraph @

dockerfiles/Dockerfile

raw
1 FROM debian:trixie-slim AS labgrid-base
2 ARG VERSION=0.0.0
3
4 LABEL maintainer="[email protected]"
5
6 ENV DEBIAN_FRONTEND=noninteractive
7
8 COPY ./ /opt/labgrid/
9
10 RUN apt update -q=2 && \
11 apt install -q=2 --yes --no-install-recommends python3 python3-dev python3-pip python3-setuptools git build-essential && \
12 rm -rf /var/lib/apt/lists/* && \
13 pip3 config --site set global.break-system-packages true && \
14 pip3 config --site set global.root-user-action ignore && \
15 cd /opt/labgrid && \
16 SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION" pip3 install --no-cache-dir .
17
18 #
19 # Client
20 #
21 FROM labgrid-base AS labgrid-client
22 ARG VERSION
23
24 RUN pip3 install yq && \
25 apt update -q=2 && \
26 apt install -q=2 --yes --no-install-recommends microcom openssh-client rsync jq qemu-system qemu-utils && \
27 rm -rf /var/lib/apt/lists/*
28
29 CMD ["/bin/bash"]
30
31 #
32 # Coordinator
33 #
34 FROM labgrid-base AS labgrid-coordinator
35 ARG VERSION
36
37 VOLUME /opt/coordinator
38
39 EXPOSE 20408
40
41 WORKDIR /opt/coordinator
42
43 CMD ["/usr/local/bin/labgrid-coordinator"]
44
45 #
46 # Exporter
47 #
48 FROM labgrid-base AS labgrid-exporter
49 ARG VERSION
50
51 COPY dockerfiles/exporter/entrypoint.sh /entrypoint.sh
52
53 RUN apt update -q=2 && \
54 apt install -q=2 --yes --no-install-recommends ser2net && \
55 rm -rf /var/lib/apt/lists/*
56
57 VOLUME /opt/conf
58
59 CMD ["/entrypoint.sh"]
60
61 #
62 # Coordinator statsd
63 #
64 FROM labgrid-base AS labgrid-coordinator-statsd
65 ARG VERSION
66
67 RUN pip3 install "statsd>=4.0.1"
68
69 ENTRYPOINT ["/opt/labgrid/contrib/coordinator-statsd.py"]