How to use proxy in `./launcher rebuild app`

AI-generated summary

A user is experiencing issues running ./launcher rebuild app due to the server’s inability to access GitHub. The user has set up a proxy config on the Docker host but has been unable to get it working, despite trying proxychains, setting http_proxy, and using git config. Falco shared a possible solution, referencing a 2017 post on using a proxy to install Discourse with internet access only via proxy: https://meta.discourse.org/t/install-discourse-with-internet-access-only-via-proxy/66396/5?u=falco.

I failed to run ./launcher rebuild app and got following output message:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git fetch --depth 1 origin tests-passed failed with return #<Process::Status: pid 210 exit 128>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin master", "git remote set-branches origin $version", "git fetch --depth 1 origin $version", "git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p           /shared/tmp/{backups,restores}\"", "bash -c \"ln    -s           /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "find public/plugins/ -maxdepth 1 -xtype l -delete"]}

I know the server cannot visit GitHub so I set the proxy config in the docker host.
I have tried to use proxychains, set http_proxy and git config, but none of them work.
It seems the commands inside docker container try to fetch data from GitHub without proxy.

Is there any way to install/update Discourse through a proxy? Thank you.

Last time I did this was ~2017, but here is the gist of it: