Replies: 1 comment
-
Sorry to say that with the paste I've lost the indentation in the docker file. So I tried it just to see and I'm happy to report IT WORKS! As for the acme-companion I made a few changes:
So (hopefully the paste is going to keep the format) here's what my docker-compose.yml looks like: version: '2' services: acme-companion: volumes: networks: With that all the containers I start (with the necessary env variables DOCKER_HOST, LETSENCRYPT_HOST, VIRTUAL_PORT and also the proxy-net declared external) under my user (non root) are correctly certified and redirected by the proxy and I can connect to each on from an external machine. I of course don't know if there is something in the existing code of both proxy and acme-companion for which this method would represent a security risk and would be extremely grateful if one of the contributors could point me out to some potential danger with this method. So unless as said someone sees a potential security risk here this seems to me a much better method of running the proxy as all containers are run as unprivileged users. Additionally I've shut down the root docker system which means that it is NOT possible to start containers as root. |
Beta Was this translation helpful? Give feedback.
-
While I appreciate that I can run the 3 containers version, therefore slightly alleviating the risk of access to /var/run/docker.sock by not including it in the nginx (proxy exposing ports) the risk is nevertheless still there since the location of that file is widely known and can easily be exploited by a script that would by other means access the machine.
Wouldn't it be possible to make the location of the socket be chosen by the user (/home/joeblow/run/docker.sock) as is the case when running docker rootless?
Seems to me this would make it much more secure as most experts agree that running docker as root represents the greatest risk in running containers.
Beta Was this translation helpful? Give feedback.
All reactions