chore: updated to HAproxy 3.0 and forced running as root #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This MR bumps haproxy to v3.0 and force it to run as root.
Discussion
Starting with haproxy 2.4, the official/upstream docker image runs with a haproxy user, instead of root (code).
While this is an improvement of their security posture, it's unenviable in the context of docker-socket-proxy. Indeed, haproxy needs to access the docker socket file, which is bound from the host where it belongs to
root:docker
on a default docker deployment (ie. not rootless).My take is that docker-socket-proxy should work out of the box with the default docker configuration. And because this MR doesn't deteriorate the current security posture of this project, im submitting it as is.
Tests
Successfully ran locally all the test I could find
poetry run pytest --prebuild
pre-commit run --all