feat(docker): Add freeipmi support (#7081)
Add freeipmi support to the docker image. Also: * Speed up build by copying dependencies instead of installing them.
Steven Hartland committed
Jan 6, 2020 at 12:01 UTC
cd7abaa69d32f119706ff75e0d1529f8087d0f0d
1 file changed
+7
-9
packaging/docker/Dockerfile
+7
-9
@@ -14,12 +14,15 @@ COPY . /opt/netdata.git
14
WORKDIR /opt/netdata.git
15
16
# Install from source
17
-RUN chmod +x netdata-installer.sh && ./netdata-installer.sh --dont-wait --dont-start-it
17
+RUN chmod +x netdata-installer.sh && \
18
+ cp -rp /deps/* /usr/local/ && \
19
+ ./netdata-installer.sh --dont-wait --dont-start-it
20
21
# files to one directory
22
RUN mkdir -p /app/usr/sbin/ \
23
/app/usr/share \
24
/app/usr/libexec \
25
+ /app/usr/local \
26
/app/usr/lib \
27
/app/var/cache \
28
/app/var/lib \
@@ -31,8 +34,8 @@ RUN mkdir -p /app/usr/sbin/ \
34
mv /var/lib/netdata /app/var/lib/ && \
35
mv /etc/netdata /app/etc/ && \
36
mv /usr/sbin/netdata /app/usr/sbin/ && \
34
- mv /judy-${JUDY_VER} /app/judy-${JUDY_VER} && \
37
mv packaging/docker/run.sh /app/usr/sbin/ && \
38
+ cp -rp /deps/* /app/usr/local/ && \
39
chmod +x /app/usr/sbin/run.sh
40
41
#####################################################################
@@ -40,7 +43,7 @@ ARG ARCH
43
# This image contains preinstalled dependecies
44
FROM netdata/base:${ARCH}
45
43
-# Conditional subscribiton to Polyverse's Polymorphic Linux repositories
46
+# Conditional subscription to Polyverse's Polymorphic Linux repositories
47
RUN if [ "$(uname -m)" == "x86_64" ]; then \
48
apk update && apk upgrade; \
49
curl https://sh.polyverse.io | sh -s install gcxce5byVQbtRz0iwfGkozZwy support+netdata@polyverse.io; \
@@ -63,11 +66,6 @@ ENV DOCKER_USR netdata
66
# If DO_NOT_TRACK is set, it will disable anonymous stats collection and reporting
67
#ENV DO_NOT_TRACK
68
RUN \
66
- # provide judy installation to base image
67
- apk add make alpine-sdk shadow && \
68
- cd /judy-${JUDY_VER} && make install && cd / && \
69
- # Clean the source stuff once judy is installed
70
- rm -rf /judy-${JUDY_VER} && apk del make alpine-sdk && \
69
# fping from alpine apk is on a different location. Moving it.
70
mv /usr/sbin/fping /usr/local/bin/fping && \
71
chmod 4755 /usr/local/bin/fping && \
@@ -88,7 +86,7 @@ RUN \
86
/var/log/netdata && \
87
chmod 0755 /usr/libexec/netdata/plugins.d/*.plugin && \
88
chmod 4755 /usr/libexec/netdata/plugins.d/cgroup-network /usr/libexec/netdata/plugins.d/apps.plugin && \
91
- # Group write permissions due to: https://github.com/netdata/netdata/pull/6543chmod 0770 -R /var/lib/netdata /var/cache/netdata && \
89
+ # Group write permissions due to: https://github.com/netdata/netdata/pull/6543
90
find /var/lib/netdata /var/cache/netdata -type d -exec chmod 0770 {} \; && \
91
find /var/lib/netdata /var/cache/netdata -type f -exec chmod 0660 {} \; && \
92
# Link log files to stdout