Commit 9485bc34 authored by Sebastian Spaink's avatar Sebastian Spaink
Browse files

fix: use su

parent d87251ce
FROM alpine:3.14
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
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 && \
update-ca-certificates
......
#!/bin/bash
#!/bin/sh
set -e
if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi
exec "$@"
if [ "$(id -u)" -ne 0 ]; then
exec "$@"
else
exec su-exec telegraf "$@"
fi
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