Skip to content

Commit 631cc76

Browse files
committed
20211116 volume-mounts - master branch - PR 1 of 3
Under 2.x versions of docker-compose, volumes statements in service definitions that have trailing slashes cause: ``` Error response from daemon: invalid mount config for type "bind": bind source path does not exist: ``` This problem only shows up on first install of a container (ie when the container's persistent storage area has not yet been initialised). There are 51 volumes statements across all current service definitions: ``` $ find ~/IOTstack/.templates -name "service.yml" -exec grep -H '\- \./volumes' {} \; | wc -l 51 ``` Of those, 5 have a trailing "/" on either or both sides: ``` $ find ~/IOTstack/.templates -name "service.yml" -exec grep -H '\- \./volumes' {} \; | grep -e '/:' -e '/$' /home/pi/IOTstack/.templates/telegraf/service.yml: - ./volumes/telegraf/:/etc/telegraf /home/pi/IOTstack/.templates/pihole/service.yml: - ./volumes/pihole/etc-pihole/:/etc/pihole/ /home/pi/IOTstack/.templates/pihole/service.yml: - ./volumes/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/ /home/pi/IOTstack/.templates/diyhue/service.yml: - ./volumes/diyhue/:/opt/hue-emulator/export/ /home/pi/IOTstack/.templates/deconz/service.yml: - ./volumes/deconz/:/opt/deCONZ ``` This pull request removes those extraneous trailing slashes. Changes do not affect current docker-compose or container behaviour.
1 parent 7d1400f commit 631cc76

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.templates/deconz/service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ deconz:
77
- "443:443"
88
- "5901:5900"
99
volumes:
10-
- ./volumes/deconz/:/opt/deCONZ
10+
- ./volumes/deconz:/opt/deCONZ
1111
devices: # This list is replaced during the build process. Modify the list in "build_settings.yml" to change it.
1212
- /dev/null
1313
environment:

.templates/diyhue/service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ diyhue:
1010
- IP=%LAN_IP_Address%
1111
- MAC=%LAN_MAC_Address%
1212
volumes:
13-
- ./volumes/diyhue/:/opt/hue-emulator/export/
13+
- ./volumes/diyhue:/opt/hue-emulator/export
1414
restart: unless-stopped
1515
networks:
1616
- iotstack_nw

.templates/pihole/service.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ pihole:
1010
- WEBPASSWORD=%randomAdminPassword%
1111
- INTERFACE=eth0
1212
volumes:
13-
- ./volumes/pihole/etc-pihole/:/etc/pihole/
14-
- ./volumes/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/
13+
- ./volumes/pihole/etc-pihole:/etc/pihole
14+
- ./volumes/pihole/etc-dnsmasq.d:/etc/dnsmasq.d
1515
dns:
1616
- 127.0.0.1
1717
- 1.1.1.1

.templates/telegraf/service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ telegraf:
99
- "8094:8094/tcp"
1010
- "8125:8125/udp"
1111
volumes:
12-
- ./volumes/telegraf/:/etc/telegraf
12+
- ./volumes/telegraf:/etc/telegraf
1313
- /var/run/docker.sock:/var/run/docker.sock:ro
1414
depends_on:
1515
- influxdb

0 commit comments

Comments
 (0)