Unverified Commit 4ca4baff authored by Joshua Powers's avatar Joshua Powers Committed by GitHub
Browse files

fix: do not run telegraf as root

parents 5400bab4 314576c6
......@@ -30,6 +30,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]
......@@ -25,10 +25,15 @@ RUN set -ex && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps
apk del .build-deps && \
addgroup -S telegraf && \
adduser -S telegraf -G telegraf && \
chown -R telegraf:telegraf /etc/telegraf
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]
......@@ -30,6 +30,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]
......@@ -25,10 +25,15 @@ RUN set -ex && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps
apk del .build-deps && \
addgroup -S telegraf && \
adduser -S telegraf -G telegraf && \
chown -R telegraf:telegraf /etc/telegraf
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]
......@@ -30,6 +30,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]
......@@ -25,10 +25,15 @@ RUN set -ex && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
gpgconf --kill all && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps
apk del .build-deps && \
addgroup -S telegraf && \
adduser -S telegraf -G telegraf && \
chown -R telegraf:telegraf /etc/telegraf
EXPOSE 8125/udp 8092/udp 8094
USER telegraf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["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