diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-17 09:30:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-17 09:30:23 +0000 |
commit | 517a443636daa1e8085cb4e5325524a54e8a8fd7 (patch) | |
tree | 5352109cc7cd5122274ab0cfc1f887b685f04edf /packaging/docker/Dockerfile | |
parent | Releasing debian version 1.42.4-1. (diff) | |
download | netdata-517a443636daa1e8085cb4e5325524a54e8a8fd7.tar.xz netdata-517a443636daa1e8085cb4e5325524a54e8a8fd7.zip |
Merging upstream version 1.43.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/docker/Dockerfile')
-rw-r--r-- | packaging/docker/Dockerfile | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index 3d05d9d2c..ddc4a4f5c 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -3,7 +3,7 @@ # This image contains preinstalled dependencies # hadolint ignore=DL3007 -FROM netdata/builder:latest as builder +FROM netdata/builder:v1 as builder # One of 'nightly' or 'stable' ARG RELEASE_CHANNEL=nightly @@ -28,7 +28,7 @@ WORKDIR /opt/netdata.git RUN chmod +x netdata-installer.sh && \ cp -rp /deps/* /usr/local/ && \ /bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='$(uname -m)'" > ./system/.install-type && \ - CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections -Wl,-z,stack-size=8388608" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ + CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ ${EXTRA_INSTALL_OPTS} --one-time-build --enable-lto "$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)" # files to one directory @@ -59,33 +59,41 @@ RUN mkdir -p /app/usr/sbin/ \ ##################################################################### # This image contains preinstalled dependencies # hadolint ignore=DL3007 -FROM netdata/base:latest as base +FROM netdata/base:v1 as base + +LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>" +LABEL org.opencontainers.image.url="https://netdata.cloud" +LABEL org.opencontainers.image.documentation="https://learn.netdata.cloud" +LABEL org.opencontainers.image.source="https://github.com/netdata/netdata" +LABEL org.opencontainers.image.title="Netdata Agent" +LABEL org.opencontainers.image.description="Official Netdata Agent Docker Image" +LABEL org.opencontainers.image.vendor="Netdata Inc." ARG OFFICIAL_IMAGE=false ENV NETDATA_OFFICIAL_IMAGE=$OFFICIAL_IMAGE -# Configure system +ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false + ARG NETDATA_UID=201 ARG NETDATA_GID=201 ENV DOCKER_GRP netdata ENV DOCKER_USR netdata # If DISABLE_TELEMETRY is set, it will disable anonymous stats collection and reporting #ENV DISABLE_TELEMETRY=1 +ENV NETDATA_LISTENER_PORT 19999 +EXPOSE $NETDATA_LISTENER_PORT + +ENV NETDATA_EXTRA_APK_PACKAGES="" -# Copy files over RUN mkdir -p /opt/src /var/log/netdata && \ - # Link log files to stdout ln -sf /dev/stdout /var/log/netdata/access.log && \ ln -sf /dev/stdout /var/log/netdata/debug.log && \ ln -sf /dev/stderr /var/log/netdata/error.log && \ ln -sf /dev/stdout /var/log/netdata/collector.log && \ ln -sf /dev/stdout /var/log/netdata/health.log && \ - # Add netdata user addgroup -g ${NETDATA_GID} -S "${DOCKER_GRP}" && \ adduser -S -H -s /usr/sbin/nologin -u ${NETDATA_GID} -h /etc/netdata -G "${DOCKER_GRP}" "${DOCKER_USR}" - # Fix handling of config directory -# Long-term this should leverage BuildKit’s mount option. COPY --from=builder /app / # Apply the permissions as described in @@ -119,21 +127,6 @@ RUN chown -R root:root \ find /var/lib/netdata /var/cache/netdata -type f -exec chmod 0660 {} \; && \ cp -va /etc/netdata /etc/netdata.stock -ENV NETDATA_LISTENER_PORT 19999 -EXPOSE $NETDATA_LISTENER_PORT - -ENV NETDATA_EXTRA_APK_PACKAGES="" - ENTRYPOINT ["/usr/sbin/run.sh"] HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh - -ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false - -LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>" -LABEL org.opencontainers.image.url="https://netdata.cloud" -LABEL org.opencontainers.image.documentation="https://learn.netdata.cloud" -LABEL org.opencontainers.image.source="https://github.com/netdata/netdata" -LABEL org.opencontainers.image.title="Netdata Agent" -LABEL org.opencontainers.image.description="Official Netdata Agent Docker Image" -LABEL org.opencontainers.image.vendor="Netdata Inc." |