Unverified Commit 015d702b authored by Joshua Powers's avatar Joshua Powers Committed by GitHub
Browse files

telegraf: add CAP_NET_RAW and NET_BIND_SERVICE capabilities

parents 725fae95 19cc48e8
......@@ -26,6 +26,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
dpkg -i telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
rm -f telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
......
......@@ -23,6 +23,7 @@ RUN set -ex && \
mv /usr/src/telegraf*/etc/telegraf/telegraf.conf /etc/telegraf/ && \
mkdir /etc/telegraf/telegraf.d && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps && \
......
......@@ -26,6 +26,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
dpkg -i telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
rm -f telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
......
......@@ -23,6 +23,7 @@ RUN set -ex && \
mv /usr/src/telegraf*/etc/telegraf/telegraf.conf /etc/telegraf/ && \
mkdir /etc/telegraf/telegraf.d && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps && \
......
......@@ -26,6 +26,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
dpkg -i telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
rm -f telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
......
......@@ -23,6 +23,7 @@ RUN set -ex && \
mv /usr/src/telegraf*/etc/telegraf/telegraf.conf /etc/telegraf/ && \
mkdir /etc/telegraf/telegraf.d && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps && \
......
......@@ -15,6 +15,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
esac && \
wget --no-verbose https://dl.influxdata.com/telegraf/nightlies/telegraf_${TELEGRAF_VERSION}_${ARCH}.deb && \
dpkg -i telegraf_${TELEGRAF_VERSION}_${ARCH}.deb && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
rm -f telegraf_${TELEGRAF_VERSION}_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
......
......@@ -14,6 +14,7 @@ RUN set -ex && \
mv /usr/src/telegraf*/etc/telegraf/telegraf.conf /etc/telegraf/ && \
mkdir /etc/telegraf/telegraf.d && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf && \
rm -rf *.tar.gz* /usr/src && \
apk del .build-deps && \
addgroup -S telegraf && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment