I’ve run into an interesting problem. Might be something dumb staring me right in the face but it eludes me.
If I run the following command from a shell script the container runs fine and the application can access the files in the mounted volumes.
docker run -d
When I run this same command as a systemd service, the container for some reason complains it can’t open the keys I have in /etc/etcd/ssl:
2018-07-24 12:38:59.079538 I | etcdmain: etcd Version: 3.2.23
2018-07-24 12:38:59.079589 I | etcdmain: Git SHA: c9504f61f
2018-07-24 12:38:59.079601 I | etcdmain: Go Version: go1.8.7
2018-07-24 12:38:59.079606 I | etcdmain: Go OS/Arch: linux/amd64
2018-07-24 12:38:59.079612 I | etcdmain: setting maximum number of CPUs to 24, total number of available CPUs is 24
2018-07-24 12:38:59.079667 I | embed: peerTLS: cert = “/var/lib/etcd/ssl/myhost.pem”, key = “/var/lib/etcd/ssl/myhost.example.com-key.pem”, ca = , trusted-ca = “/var/lib/etcd/ssl/ca.pem”, client-cert-auth = false
2018-07-24 12:38:59.079786 C | etcdmain: open “/var/lib/etcd/ssl/myhost.pem”: no such file or directory
Yet when I bash into the container I can access the file without issue.
I’ve already tried opening the permissions to wide open even though everything is running as root.
Anyone have any ideas?
p.s. Why in the world does a support forum related to docker limit a user to a post containing 2 URL’s? /FACEPALM