Firefox does not obey the HTTP_PROXY/http_proxy environment variables on Linux without additional plugins. There's no way to explicitly configure Firefox to use a proxy via the command-line, so workarounds are needed.
My usecase is setting up a throwaway Firefox instance in a container using an SSH SOCKS proxy for interactive browsing of restricted web interfaces.
To do the setup, create a new profile via:
mkdir /tmp/firefox_profile
echo 'user_pref("network.proxy.socks", "host.docker.internal");' >> /tmp/firefox_profile/prefs.js
echo 'user_pref("network.proxy.socks_port", 9000);' >> /tmp/firefox_profile/prefs.js
echo 'user_pref("network.proxy.type", 1);' >> /tmp/firefox_profile/prefs.js