Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20211116 volume-mounts - experimental branch - PR 3 of 3 #453

Conversation

Paraphraser
Copy link

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.

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.
@Slyke Slyke merged commit aa6b81d into SensorsIot:experimental Dec 3, 2021
@Paraphraser Paraphraser deleted the 20211128-volume-mounts-experimental branch December 7, 2021 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants