cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open OlehGap opened this issue 1 year ago • 3 comments

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 avatar Mar 04 '24 11:03 OlehGap

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

OlehGap avatar Mar 05 '24 09:03 OlehGap

This might be related to #281 🤔

jontze avatar Mar 18 '24 12:03 jontze

@gauravsaini04 Can you help investigate this issue? Thanks!

samruddhikhandale avatar Apr 02 '24 17:04 samruddhikhandale

hi @OlehGap , are you still facing the issue?

gauravsaini04 avatar May 14 '24 03:05 gauravsaini04

Feel free to reopen with more information. Thanks!

samruddhikhandale avatar May 25 '24 00:05 samruddhikhandale