summaryrefslogtreecommitdiffstats
path: root/packaging/docker/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packaging/docker/Dockerfile (renamed from docker/Dockerfile)19
1 files changed, 14 insertions, 5 deletions
diff --git a/docker/Dockerfile b/packaging/docker/Dockerfile
index a852f3044..73cd9030f 100644
--- a/docker/Dockerfile
+++ b/packaging/docker/Dockerfile
@@ -6,6 +6,7 @@
ARG ARCH=amd64-v3.8
FROM multiarch/alpine:${ARCH} as builder
+ARG OUTPUT="/dev/stdout"
# Install prerequisites
RUN apk --no-cache add alpine-sdk \
autoconf \
@@ -33,8 +34,7 @@ WORKDIR /opt/netdata.git
# Install from source
RUN chmod +x netdata-installer.sh && \
- sync && sleep 1 && \
- ./netdata-installer.sh --dont-wait --dont-start-it
+ ./netdata-installer.sh --dont-wait --dont-start-it &>${OUTPUT}
# files to one directory
RUN mkdir -p /app/usr/sbin/ \
@@ -51,14 +51,14 @@ RUN mkdir -p /app/usr/sbin/ \
mv /var/lib/netdata /app/var/lib/ && \
mv /etc/netdata /app/etc/ && \
mv /usr/sbin/netdata /app/usr/sbin/ && \
- mv docker/run.sh /app/usr/sbin/ && \
+ mv packaging/docker/run.sh /app/usr/sbin/ && \
chmod +x /app/usr/sbin/run.sh
#####################################################################
ARG ARCH
FROM multiarch/alpine:${ARCH}
-# Reinstall some prerequisites
+# Install some prerequisites
RUN apk --no-cache add curl \
fping \
jq \
@@ -71,6 +71,15 @@ RUN apk --no-cache add curl \
py-yaml \
python
+# Conditional subscribiton to Polyverse's Polymorphic Linux repositories
+RUN if [ "$(uname -m)" == "x86_64" ]; then \
+ curl https://sh.polyverse.io | sh -s install gcxce5byVQbtRz0iwfGkozZwy support+netdata@polyverse.io; \
+ apk update; \
+ apk upgrade --available --no-cache; \
+ sed -in 's/^#//g' /etc/apk/repositories; \
+ fi
+
+
# Copy files over
COPY --from=builder /app /
@@ -86,7 +95,7 @@ RUN \
addgroup -g ${NETDATA_GID} -S netdata && \
adduser -S -H -s /usr/sbin/nologin -u ${NETDATA_GID} -h /etc/netdata -G netdata netdata && \
# Apply the permissions as described in
- # https://github.com/netdata/netdata/tree/master/doc/netdata-security.md#netdata-directories
+ # https://github.com/netdata/netdata/wiki/netdata-security#netdata-directories
chown -R root:netdata /etc/netdata && \
chown -R netdata:netdata /var/cache/netdata /var/lib/netdata /usr/share/netdata && \
chown -R root:netdata /usr/lib/netdata && \