Skip to content

Behind a proxy: "Error getting blob: Error: connect ETIMEDOUT 185.199.108.154:443" #770

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

Closed
OlehGap opened this issue Mar 4, 2024 · 5 comments
Assignees

Comments

@OlehGap
Copy link

OlehGap commented Mar 4, 2024

Can someone help me find where I missed the proxy settings?

I build a devcontainer behind a proxy without using "features". No issues, all work fine.

But once I added

	"features": {
		"ghcr.io/devcontainers/features/terraform:1": {}
	},

to devcontainer.json I've got an error:

[28506 ms] * Fetching feature: terraform_0_oci
[49820 ms] Error getting blob: Error: connect ETIMEDOUT 185.199.108.154:443

In my understanding, I should even see public IP like that one above. All http(s) request should go to the proxy server.

From the container
env | grep -i proxy
returns the correct proxy settings.

And the same build works with "features" on 4G network, or any "nonproxy" network , at home etc.

@OlehGap
Copy link
Author

OlehGap commented Mar 5, 2024

Sorry, forgot to share config

devcontainer.json

{
	"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",

	"name": "Container Troubleshooting",
	"build": {
	  "dockerfile": "Dockerfile",
	  "context": ".",
	  "args": {
		"ALL_PROXY": "http://10.107.192.75:80",
		"HTTPS_PROXY": "http://10.107.192.75:80",
		"HTTP_PROXY": "http://10.107.192.75:80",
		"http_proxy": "http://10.107.192.75:80",
		"https_proxy": "http://10.107.192.75:80"		
	  }
	},
  
	"containerEnv": {
		"HTTP_PROXY": "${localEnv:HTTP_PROXY}",
		"HTTPS_PROXY": "${localEnv:HTTP_PROXY}",
		"http_proxy": "${localEnv:HTTP_PROXY}",
		"https_proxy": "${localEnv:HTTP_PROXY}"
	  },

	 "features": {
		"ghcr.io/devcontainers/features/terraform:1": {}
	 },

	"postCreateCommand": "npm install -g @devcontainers/cli",

	"forwardPorts": [3000]
  }

and dockerfile

ARG ALL_PROXY
ARG HTTPS_PROXY
ARG HTTP_PROXY
FROM ubuntu

# Proxy settings
#
ENV https_proxy=http://10.107.192.75:80
ENV HTTPS_PROXY=http://10.107.192.75:80
ENV http_proxy=http://10.107.192.75:80
ENV HTTP_PROXY=http://10.107.192.75:80
ENV all_proxy=http://10.107.192.75:80
ENV ALL_PROXY=http://10.107.192.75:80

# Set noninteractive installation for apt-get commands
ENV DEBIAN_FRONTEND=noninteractive

RUN env | grep -i proxy

Also proxy is set in docker desktop

image

@jontze
Copy link

jontze commented Mar 18, 2024

This might be related to #281 🤔

@samruddhikhandale
Copy link
Member

@gauravsaini04 Can you help investigate this issue? Thanks!

@gauravsaini04
Copy link
Contributor

hi @OlehGap , are you still facing the issue?

@samruddhikhandale
Copy link
Member

Feel free to reopen with more information. Thanks!

@samruddhikhandale samruddhikhandale closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
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

4 participants