Skip to content

Commit 1a02d85

Browse files
committed
mounting USB drive in influxdb container
1 parent 91c8993 commit 1a02d85

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

influxdb/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
FROM arm32v7/influxdb:latest
2-
RUN echo "LABEL=influxdb /mnt/influxdb ext4 rw,relatime,discard,data=ordered 0 2" >> /etc/fstab
3-
COPY start.sh .
2+
RUN echo "LABEL=influxdb /mnt/usbdrive ext4 rw,relatime,discard,data=ordered 0 2" >> /etc/fstab
3+
#overwrite the default entrypoint script by mine script that contains the mount instruction
4+
COPY my_entrypoint.sh /entrypoint.sh

influxdb/start.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
#!/bin/bash
2-
mkdir -p /mnt/influxdb
3-
mount /mnt/influxdb
2+
# JVA 2018-11-15 I have added following instructions to mount usbdrive
3+
mkdir -p /mnt/usbdrive
4+
mount /mnt/usbdrive
5+
6+
# here below original entrypoint.sh (see https://github.com/influxdata/influxdata-docker/tree/35d89882b57f333d9518b4556e7b872ce970e620/influxdb/1.7)
7+
set -e
8+
9+
if [ "${1:0:1}" = '-' ]; then
10+
set -- influxd "$@"
11+
fi
12+
13+
if [ "$1" = 'influxd' ]; then
14+
/init-influxdb.sh "${@:2}"
15+
fi
16+
17+
exec "$@"

0 commit comments

Comments
 (0)