I have an installer which pumps out some values to a .env file to be used by docker-compose. All of this has worked so far with the exception of an SSH key which cannot be seemingly used.
I have so far tried with both the correctly formatted private key and also replacing new lines with \n. However, this breaks the work flow further down the line and does not appear using printenv within the container as a multi line variable which is required.
docker-compose.yml
myservice:
build: .
environment:
- SSH_KEY
- SINGLE_LINE_VALUE
.env (ignore the obviously broke sshkey)
SINGLE_LINE_VALUE=I Load just fine
SSH_KEY="---------------
ABCDEFGH
--------------------
"
by the time the container is running, the environment value for SSH_KEY is simply "---------------
Any ideas very much appreciated.