Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How i can enable HTTP_PROXY in the docker container? #132

Open
lanbugs opened this issue Jul 15, 2024 · 1 comment
Open

How i can enable HTTP_PROXY in the docker container? #132

lanbugs opened this issue Jul 15, 2024 · 1 comment

Comments

@lanbugs
Copy link

lanbugs commented Jul 15, 2024

Hi,

I search for the most easiest way to enforce the docker container to use proxy servers to do git clone etc.

I tried to build a own container based on catthehacker/ubuntu:act-22.04 with the following config:

`
FROM catthehacker/ubuntu:act-22.04

ENV http_proxy=http://10.10.10.10:3128
ENV https_proxy=http://10.10.10.10:3128

RUN git config --global http.proxy http://10.10.10.10:3128
RUN git config --global https.proxy http://10.10.10.10:3128

RUN npm config set proxy http://10.10.10.10:3128
RUN npm config set https-proxy http://10.10.10.10:3128
`

I build this machine and adviced my act runner to take my own machine. But still problems when he tries to clone any external actions.

If i start the new container with docker run ENV variables present and git clone etc. works perfectly, i don`t know where i am turned wrong at the moment.

Thanks & Greetings

Max

@ngarafol
Copy link

ngarafol commented Jul 16, 2024

Did you verify in your containers if proxy is visible in env? e.g. exec into running container or run it, and do printenv |grep proxy

Also take a look at this, looks pretty easy https://stackoverflow.com/a/30252882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants