Dockerfile: add CAP_NET_BIND_SERVICE+eip to fabio to allow running as root#938
Conversation
|
If your using setcap shouldn’t you be running as non-root? The root user already has permissions. |
|
if you add a |
8ac6e18 to
59d773a
Compare
|
Sorry @Kamilcuk, can I ask for the changes to be limited to just one feature? |
|
This information is already in the docs as well: https://fabiolb.net/faq/binding-to-low-ports/ |
59d773a to
3b58d7e
Compare
3b58d7e to
d0058a6
Compare
|
Hi, I am sorry. Should be ok now. I blame my headache. |
tristanmorgan
left a comment
There was a problem hiding this comment.
Testing before this change:
$ docker run --rm -it -p 80:80 -u nobody:nogroup --network=host -v ${PWD}/fabio.properties:/etc/fabio/fabio.properties -e FABIO_proxy_addr=":80;proto=http" -e FABIO_registry_consul_addr=${CONSUL_HTTP_ADDR} fabio:before
....
2024/09/04 23:19:28 [FATAL] listen: Fail to listen. listen tcp :80: bind: permission denied
and after changes applied (and dropping the -v parameter too) the listener succeeds.
|
related #378 |
Without the change, the following fails:
After the change, it works. This is the only change needed to run fabio as non-root. System administrator can choose the user with docker options.
Related: #369 marco-m@c0391d2 #851