Added Docker build arg to pass extra options to installer. (#8472)
This adds a build argument to the main Dockerfile to allow passing extra options to the netdata-installer script during the build process. The value specified in the `EXTRA_INSTALL_OPTS` argument wil be added verbatm to the netdata-installer.sh script. The arguments `--dont-start-it` and `--dont-wait` are still implicitly passed to the script as those are required to get a correctly functioning Docker image.
Austin S. Hemmelgarn committed
Mar 24, 2020 at 15:37 UTC
bdc2d99c357cd0a787a238b4d7437ce88c77c32f
1 file changed
+5
-1
packaging/docker/Dockerfile
+5
-1
@@ -12,6 +12,10 @@ ARG RELEASE_CHANNEL=nightly
12
13
ENV JUDY_VER 1.0.5
14
15
+ARG EXTRA_INSTALL_OPTS
16
+
17
+ENV EXTRA_INSTALL_OPTS=$EXTRA_INSTALL_OPTS
18
+
19
# Copy source
20
COPY . /opt/netdata.git
21
WORKDIR /opt/netdata.git
@@ -19,7 +23,7 @@ WORKDIR /opt/netdata.git
23
# Install from source
24
RUN chmod +x netdata-installer.sh && \
25
cp -rp /deps/* /usr/local/ && \
22
- ./netdata-installer.sh --dont-wait --dont-start-it \
26
+ ./netdata-installer.sh --dont-wait --dont-start-it ${EXTRA_INSTALL_OPTS} \
27
$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)
28
29
# files to one directory