Route entire container traffic through a http proxy

I want to make a docker container route its entire traffic through an HTTP proxy, without having to set the HTTP_PROXY environment variable, as it doesn’t work with most applications / binaries on the system.

Also, I haven’t found anything in the docker docs regarding this feature, so is it even possible and if not what are my alternatives?