Using host proxy for all containers

Greetings, I’m a newbie who barely knows what I’m doing and I’m trying to get all container traffic to go through my system proxy, without any success.

I have been trying the options I found on the internet. Basically add the HTTP_PROXY variables to systemd, to the ~/.docker/config.json file and in the container itself with docker run.

When I run sudo systemctl show --property=Environment docker it shows them correctly Environment=HTTP_PROXY=socks5://, but I can’t get it to work. Could someone please explain in eli5 what am I doing wrong?

I am using the latest cli version for ubuntu.