Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GitHub Mirror
influxdata
influxdata-docker
Commits
72b1f3a1
Unverified
Commit
72b1f3a1
authored
Nov 10, 2021
by
Sebastian Spaink
Committed by
GitHub
Nov 10, 2021
Browse files
Merge pull request #541 from influxdata/telegrafnightly
parents
cc9d39ea
8257bf8c
Changes
4
Hide whitespace changes
Inline
Side-by-side
telegraf/nightly/Dockerfile
0 → 100644
View file @
72b1f3a1
FROM
buildpack-deps:buster-curl
RUN
DEBIAN_FRONTEND
=
noninteractive apt-get update
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
iputils-ping snmp procps lm-sensors
&&
\
rm
-rf
/var/lib/apt/lists/
*
ENV
TELEGRAF_VERSION nightly
RUN
ARCH
=
&&
dpkgArch
=
"
$(
dpkg
--print-architecture
)
"
&&
\
case
"
${
dpkgArch
##*-
}
"
in
\
amd64
)
ARCH
=
'amd64'
;;
\
arm64
)
ARCH
=
'arm64'
;;
\
armhf
)
ARCH
=
'armhf'
;;
\
armel
)
ARCH
=
'armel'
;;
\
*
)
echo
"Unsupported architecture:
${
dpkgArch
}
"
;
exit
1
;;
\
esac
&&
\
wget
--no-verbose
https://dl.influxdata.com/telegraf/nightlies/telegraf_
${
TELEGRAF_VERSION
}
_
${
ARCH
}
.deb
&&
\
dpkg
-i
telegraf_
${
TELEGRAF_VERSION
}
_
${
ARCH
}
.deb
&&
\
rm
-f
telegraf_
${
TELEGRAF_VERSION
}
_
${
ARCH
}
.deb
*
EXPOSE
8125/udp 8092/udp 8094
COPY
entrypoint.sh /entrypoint.sh
ENTRYPOINT
["/entrypoint.sh"]
CMD
["telegraf"]
telegraf/nightly/alpine/Dockerfile
0 → 100644
View file @
72b1f3a1
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 su-exec
&&
\
update-ca-certificates
ENV
TELEGRAF_VERSION nightly
RUN
set
-ex
&&
\
apk add
--no-cache
--virtual
.build-deps wget
tar
&&
\
wget
--no-verbose
https://dl.influxdata.com/telegraf/nightlies/telegraf-
${
TELEGRAF_VERSION
}
_static_linux_amd64.tar.gz
&&
\
mkdir
-p
/usr/src /etc/telegraf
&&
\
tar
-C
/usr/src
-xzf
telegraf-
${
TELEGRAF_VERSION
}
_static_linux_amd64.tar.gz
&&
\
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/
&&
\
rm
-rf
*
.tar.gz
*
/usr/src
&&
\
apk del .build-deps
&&
\
addgroup
-S
telegraf
&&
\
adduser
-S
telegraf
-G
telegraf
&&
\
chown
-R
telegraf:telegraf /etc/telegraf
EXPOSE
8125/udp 8092/udp 8094
COPY
entrypoint.sh /entrypoint.sh
ENTRYPOINT
["/entrypoint.sh"]
CMD
["telegraf"]
telegraf/nightly/alpine/entrypoint.sh
0 → 100644
View file @
72b1f3a1
#!/bin/sh
set
-e
if
[
"
${
1
:0:1
}
"
=
'-'
]
;
then
set
--
telegraf
"
$@
"
fi
if
[
"
$(
id
-u
)
"
-ne
0
]
;
then
exec
"
$@
"
else
exec
su-exec telegraf
"
$@
"
fi
telegraf/nightly/entrypoint.sh
0 → 100644
View file @
72b1f3a1
#!/bin/bash
set
-e
if
[
"
${
1
:0:1
}
"
=
'-'
]
;
then
set
--
telegraf
"
$@
"
fi
if
[
$EUID
-ne
0
]
;
then
exec
"
$@
"
else
exec
setpriv
--reuid
telegraf
--init-groups
"
$@
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment