marcogreiveldinger / videos

This is a repository about my youtube videos where you can find code-snippets, links and other tutorials
MIT License
56 stars 17 forks source link

docker-socket-proxy unnecessary port mappings #3

Closed marcogreiveldinger closed 9 months ago

marcogreiveldinger commented 9 months ago

Great video! Unfortunately you kind of made a less secure. By using the ports directive in the compose you expose the (well known Docker-)Port on your whole machine. You also enable any container to access information about your docker environment. To circumvent all of that, I would fiestly remove the ports section on the proxy and secondly create a second network that's only used for the proxy and treafik. Keep in mind that traefik needs access to the default anf the socket proxy network, though;)

Link to comment

The docker-socket-proxy will be available from the host machine with the ports directive which is a bad pattern.

Solution: Remove port mappings, and create different networks

marcogreiveldinger commented 9 months ago

See #4