summaryrefslogtreecommitdiffstats
path: root/packaging/docker/Dockerfile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
commite970e0b37b8bd7f246feb3f70c4136418225e434 (patch)
tree0b67c0ca45f56f2f9d9c5c2e725279ecdf52d2eb /packaging/docker/Dockerfile
parentAdding upstream version 1.31.0. (diff)
downloadnetdata-e970e0b37b8bd7f246feb3f70c4136418225e434.tar.xz
netdata-e970e0b37b8bd7f246feb3f70c4136418225e434.zip
Adding upstream version 1.32.0.upstream/1.32.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/docker/Dockerfile')
-rw-r--r--packaging/docker/Dockerfile14
1 files changed, 11 insertions, 3 deletions
diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile
index d91d1a773..d99d393ae 100644
--- a/packaging/docker/Dockerfile
+++ b/packaging/docker/Dockerfile
@@ -25,7 +25,8 @@ WORKDIR /opt/netdata.git
# Install from source
RUN chmod +x netdata-installer.sh && \
cp -rp /deps/* /usr/local/ && \
- ./netdata-installer.sh --dont-wait --dont-start-it ${EXTRA_INSTALL_OPTS} \
+ /bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='$(uname -m)'" > ./system/.install-type && \
+ ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf ${EXTRA_INSTALL_OPTS} \
"$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)"
# files to one directory
@@ -56,6 +57,9 @@ RUN mkdir -p /app/usr/sbin/ \
# hadolint ignore=DL3007
FROM netdata/base:latest as base
+ARG OFFICIAL_IMAGE=false
+ENV NETDATA_OFFICIAL_IMAGE=$OFFICIAL_IMAGE
+
# Configure system
ARG NETDATA_UID=201
ARG NETDATA_GID=201
@@ -98,8 +102,10 @@ RUN chown -R root:root \
chmod 0755 /usr/libexec/netdata/plugins.d/*.plugin && \
chmod 4755 \
/usr/libexec/netdata/plugins.d/cgroup-network \
- /usr/libexec/netdata/plugins.d/apps.plugin \
- /usr/libexec/netdata/plugins.d/freeipmi.plugin && \
+ /usr/libexec/netdata/plugins.d/apps.plugin && \
+ if [ -f /usr/libexec/netdata/plugins.d/freeipmi.plugin ]; then \
+ chmod 4755 /usr/libexec/netdata/plugins.d/freeipmi.plugin; \
+ fi && \
# Group write permissions due to: https://github.com/netdata/netdata/pull/6543
find /var/lib/netdata /var/cache/netdata -type d -exec chmod 0770 {} \; && \
find /var/lib/netdata /var/cache/netdata -type f -exec chmod 0660 {} \; && \
@@ -112,3 +118,5 @@ EXPOSE $NETDATA_LISTENER_PORT
ENTRYPOINT ["/usr/sbin/run.sh"]
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh
+
+ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false