Skip to content

Commit e920f99

Browse files
committed
mount usbdrive also in telegraf container as readonly
1 parent f5e8f08 commit e920f99

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

telegraf/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
FROM arm32v7/telegraf:latest
22
COPY telegraf.conf /etc/telegraf/telegraf.conf
3+
4+
RUN echo "LABEL=influxdb /mnt/usbdrive ext4 ro,relatime,discard,data=ordered 0 2" >> /etc/fstab
5+
6+
# The script "my_entrypoint.sh" is an extension of the existing script with extra instructions to mount the usb memory stick.
7+
COPY my_entrypoint.sh /entrypoint.sh
8+
RUN chmod +x /entrypoint.sh

telegraf/my_entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# JVA 2018-11-15 I have added following instructions to mount usbdrive and create subfolder influxdb
3+
# this is added to that we can also monitor the usbdrive.
4+
mkdir -p /mnt/usbdrive
5+
mount /mnt/usbdrive
6+
7+
# here below copy paste of original entrypoint.sh. see :
8+
# https://github.com/influxdata/influxdata-docker/blob/e90ed7bbdcd69305c615fe9be7903ef2e93ad978/telegraf/1.8/entrypoint.sh
9+
set -e
10+
11+
if [ "${1:0:1}" = '-' ]; then
12+
set -- telegraf "$@"
13+
fi
14+
15+
exec "$@"

0 commit comments

Comments
 (0)