-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile: add CAP_NET_BIND_SERVICE+eip to fabio to allow running as root #938
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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