Unverified Commit 314576c6 authored by Josh Powers's avatar Josh Powers
Browse files

telegraf: update alpine dockerfiles

* consolidates the addgroup & adduser commands
* sets the owner & group of the /etc/telegraf directory to the new
  telegraf user & group
parent 83520188
......@@ -25,12 +25,13 @@ 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
RUN addgroup -S telegraf
RUN adduser -S telegraf -G telegraf
USER telegraf
COPY entrypoint.sh /entrypoint.sh
......
......@@ -25,12 +25,13 @@ 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
RUN addgroup -S telegraf
RUN adduser -S telegraf -G telegraf
USER telegraf
COPY entrypoint.sh /entrypoint.sh
......
......@@ -25,12 +25,13 @@ 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
RUN addgroup -S telegraf
RUN adduser -S telegraf -G telegraf
USER telegraf
COPY entrypoint.sh /entrypoint.sh
......
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