We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d87251c commit 9485bc3Copy full SHA for 9485bc3
telegraf/nightly/alpine/Dockerfile
@@ -1,7 +1,7 @@
1
FROM alpine:3.14
2
3
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
4
-RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors tzdata && \
+RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors tzdata su-exec && \
5
update-ca-certificates
6
7
telegraf/nightly/entrypoint.sh
@@ -1,8 +1,12 @@
-#!/bin/bash
+#!/bin/sh
set -e
if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi
8
-exec "$@"
+if [ "$(id -u)" -ne 0 ]; then
9
+ exec "$@"
10
+else
11
+ exec su-exec telegraf "$@"
12
+fi
0 commit comments