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

Remote-Containers: Clone Repository in Container Volume doesn't work behind proxy #7143

Open
kse3hi opened this issue Aug 18, 2022 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers proxy Issues regarding network proxies volume Dev Container mounting a Docker volume

Comments

@kse3hi
Copy link

kse3hi commented Aug 18, 2022

  • VSCode Version: 1.70.1
Version: 1.70.1 (user setup)
Commit: 6d9b74a70ca9c7733b29f0456fd8195364076dda
Date: 2022-08-10T06:08:33.642Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19044
  • Local OS Version: Windows 10.0.19044 Build 19044
  • Local chip architecture:
  • Reproduces in: <Remote - Containers>
  • Corporate Proxy: yes
  • Name of Dev Container Definition with Issue:

Steps to Reproduce:

  1. Press "F1" > Select "Remote-Containers: Clone Repository in Container Volume" > Select: "Clone a repository from GitHub in a Container Volume"
  2. Select Repo and branch
    Repo contains .devcontainer folder with Dockerfile with:
...
ENV HTTP_PROXY="${http://host.docker.internal}:${3128}"
ENV HTTPS_PROXY=...
...

Expectation:

  • repo should be cloned and Devcontainer with proper setup should be created.

Observation:

  • creating the temporary bootstap.Dockerfile failed even early before exact cloning step.

Remote-Container Issue.log

@bamurtaugh bamurtaugh transferred this issue from microsoft/vscode-dev-containers Aug 31, 2022
@bamurtaugh bamurtaugh added the containers Issue in vscode-remote containers label Aug 31, 2022
@bamurtaugh
Copy link
Member

cc @chrmarti transferring from vscode-dev-containers to vscode-remote-release as I believe this is more extension specific.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies labels Sep 6, 2022
@chrmarti chrmarti self-assigned this Sep 6, 2022
@OneCyrus
Copy link

OneCyrus commented Oct 8, 2022

Same issue here. Clone doesn’t use the devcontainer and dockerfile from the repo but bootstraps with a generic dockerfile/image. there should be a way to at least customize the bootstrapped dockerfile for cloning.

@kse3hi
Copy link
Author

kse3hi commented Oct 17, 2022

Additional information:
Environment: Dev Containers 0.255.4 in VS Code 1.72.2 (d045a5eda657f4d7b676dedbfa7aab8207f8a075)
Looks like operating with docker under cloned repository performed in the container
[139289 ms] Start: Run in container: docker volume ls -q
Therefore question: If I defined proxy settings on my host machine via .docker/config.json, including PROXY settings, will be this setting applied with operating with docker in bootstrap container?

Looks like it is exactly the issue - therefore no proxy are applied - everything is failing with error as:
#13 11.09 fatal: unable to access 'https://github.com/ohmyzsh/ohmyzsh/': Could not resolve host: github.com

Same Dockerfile (DevContainer) works perfectly if you first clone it locally and perform: "DevContiner:Open Folder in Container. "

new_logs.log

Success log with local cloning: remoteContainers-2022-10-17T14-15-19.682Z.log

@matejetz
Copy link

I have the exact same issue, container creation with locally checked out repo works fine but "Clone a repository from GitHub in a Container Volume" fails.
At first it failed because the bootstrap image didn't have git-lfs installed even though its a feature in our devcontainer. After manually adding it to the bootstrap.Dockerfile it now fails with the Could not resolve host: ... errors although docker client is configured to use the proxy and is working for all other containers.

@chrmarti chrmarti added the volume Dev Container mounting a Docker volume label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers proxy Issues regarding network proxies volume Dev Container mounting a Docker volume
Projects
None yet
Development

No branches or pull requests

5 participants