-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (51 loc) · 1.99 KB
/
Dockerfile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM debian:11-slim
LABEL org.opencontainers.image.authors="info@paessler.com"
LABEL org.opencontainers.image.vendor="Paessler GmbH"
LABEL org.opencontainers.image.licenses="MIT"
ARG DEBIAN_FRONTEND=noninteractive
# enforce image to be up to date
RUN \
apt-get update \
&& apt-get -y upgrade \
&& apt-get clean
# install necessary prerequisites
#
# needed additional packages:
# - ca-certificates (for TLS certificate validation and curl)
# - python3-minimal (for Script v2 sensor)
# - gosu (to drop to unprivileged user)
# - libcap2-bin (for setcap command)
#
RUN \
apt-get update \
&& apt-get -y install --no-install-recommends --no-install-suggests \
ca-certificates \
python3-minimal \
gosu \
libcap2-bin \
&& apt-get clean
# add paessler's official package repository
RUN \
apt-get update \
&& apt-get -y install --no-install-recommends --no-install-suggests \
curl \
&& curl --fail --silent https://packages.paessler.com/keys/paessler.asc > /usr/share/keyrings/paessler-archive-keyring.asc \
&& curl --fail --silent https://packages.paessler.com/docs/apt-sources/$(. /etc/os-release && echo $VERSION_CODENAME).sources > /etc/apt/sources.list.d/paessler.sources \
&& apt-get -y remove --purge curl \
&& apt-get clean
# install the latest multi-platform probe
RUN \
apt-get update \
&& apt-get -y install --no-install-recommends --no-install-suggests \
prtgmpprobe \
&& apt-get clean
# add entrypoint script
COPY --chown=root:root --chmod=0555 run-prtgmpprobe.sh /run-prtgmpprobe.sh
# specify volumes:
# - /config : configuration directory for the prtgmpprobe, put your config.yml here.
# - /opt/paessler/share/scripts : scripts directory for the Script v2 sensor. Mount your scripts here.
VOLUME [ "/config", "/opt/paessler/share/scripts" ]
# set WORKDIR to a sane default
WORKDIR /
ENTRYPOINT [ "/run-prtgmpprobe.sh" ]
CMD [ "service-run" ]