It appears you have to update the haproxy base image as well. (1.9 is pretty old anyway)
This however creates 2 new issues:
reqadd
has been deprecated so you have to replace it twice in the haproxy.cfg:
andfrontend http-in ... # reqadd X-Forwarded-Proto:\ http http-request add-header X-Forwarded-Proto http
frontend https-in ... # reqadd X-Forwarded-Proto:\ https http-request add-header X-Forwarded-Proto https
- The new haproxy base image also no longer runs as root but as user called haproxy. You will have to make some minor modifications to the haproxy Dockerfile to keep everything working:
FROM haproxy:2.9.6-alpine VOLUME [ "/certs" ] # Switch back to root to install packages USER root RUN apk add --update inotify-tools # Make haproxy user owner of certificate directory (is root by default) RUN chown haproxy:haproxy /etc/ssl/private # Switch back to haproxy user USER haproxy COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg COPY start-haproxy.sh /start-haproxy CMD /start-haproxy