-
Notifications
You must be signed in to change notification settings - Fork 191
Upgrade HAProxy image tag to lts-alpine #149
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
Conversation
- upgraded base image tag from haproxy:2.2-alpine to haproxy:lts-alpine - resolved permission issues cause by user in base image changing from root to haproxy - updated tests - updated documentation
|
|
||
| frontend dockerfrontend | ||
| bind ${BIND_CONFIG} | ||
| bind "$BIND_PORT" "$BIND_OPTIONS" |
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.
To make it possible to disable ipv6 via env I had to make this change in the HAProxy config. It works, but leads to warnings on start.
If someone knows a better way to do this, let me know.
|
I additionally upgraded the version of the Ubuntu image used for the Github jobs to ubuntu-latest and the version of the actions/cache to v4, so that the workflow runs again. Let me know if you would prefer something different here. |
|
Thank you for the update!
|
|
Thanks for the feedback, I pinned the Ubuntu image version to 24.04. I did some basic end-to-end tests. Running this set of commands: I received this output: Which looks good to me. |
|
Adding group_add in every docker-compose.yml would break existing setups. |
|
Adding the And because the GID of the What we could do is start the entrypoint script as |
|
It could be fine for us. If you want, do the change please and I will test if it works properly. |
- moved most of docker-entrypoint.sh into start-haproxy.sh - made container run as root initially, assign group of docker socket to haproxy user and execute start-haproxy.sh as haproxy - passthrough positional parameters to start-haproxy - updated documentation
|
I've implemented your proposed solution. Let me know what you think! Edit: |
|
@josep-tecnativa Sorry for pinging you directly, but did you have time to test? |
|
Sorry, not yet. I will try to test it this week. |
|
Hi @josep-tecnativa, sorry again for being obnoxious, but do you think you will have time to test this week? |
|
I just started using an internal fork including the changes from this PR for my customers. If something comes up, I will document it here. |
|
Practical testing has shown that the solution implemented here (starting the container as root and adding the docker group to the haproxy user) is unreliable. My preferred solution unfortunately breaks existing setups. So I will instead fork the repo permanently and close this PR. |
This PR includes the following changes:
WARNING!
This PR will change how the image is used. An additional parameter
--group-add=<docker_group_gid>is required to give the container's user (haproxy) permissions to access the Docker socket.