Special characters in password not handled by docker compose
OS: Ubuntu 18.04.1 LTS - Desktop
Linux 4.4.0-137-generic #163 (closed)-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Docker version : 18.06.1-ce, build e68fc7a
docker-compose version 1.22.0, build f46880fe
On playbook run there's an issue with the homeoslab role on the docker-compose task;
fatal: [myserver]: FAILED! => {"changed": true, "cmd": ["docker-compose", "-f", "/var/homelabos/docker/docker-compose.yml", "pull"], "delta": "0:00:01.628213", "end": "2018-10-14 22:23:12.238190", "msg": "non-zero return code", "rc": 1, "start": "2018-10-14 22:23:10.609977", "stderr": "Invalid interpolation format for \"environment\" option in service \"pihole\": \"WEBPASSWORD=mypasswordwith$character\"", "stderr_lines": ["Invalid interpolation format for \"environment\" option in service \"pihole\": \"WEBPASSWORD=mju7nhy6HOMEOS$\""], "stdout": "", "stdout_lines": []}
I think there's an issue with using "$" in my password
In that docker-compose.yml file locally and on the server itself things look fine
pihole:
image: diginc/pi-hole:latest
restart: always
volumes:
- /var/homelabos/pihole/config/:/etc/pihole/
- /var/homelabos/pihole/dnsmasq.d/:/etc/dnsmasq.d/
environment:
- WEBPASSWORD=mypasswordwith$character
The '$' character and perhaps other special characters can't be handled in the password.
See related compose issue on this; https://github.com/docker/compose/issues/4485
Worked fine as soon as I re-ran make setup
without a password.