microsoft / microsoft/vscode-remote-release

Clone Repository in Container Volume does not respect proxy settings

Open
#4,865 16 comments 1 reaction 1 assignee View on GitHub

@chrmarti is already working on this.

Since Apr 14, 2021.

bug containers proxy
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.55.1
  • Local OS Version: Win 10 20H2
  • Remote OS Version: n/a
  • Remote Extension/Connection Type: Docker

Information:

When trying to clone a repository in a container volume the volume bootstrap image is trying to run apk add commands. My network environment requires the use of a proxy server so this will not work without the proxy settings configured but there is no way to provide theses settings.

Steps to Reproduce:

  1. Must be in an environment that requires the use of a proxy server for all outbound internet traffic.
  2. Run "Remote-Containers: Clone Repository in Container Volume..." with any URL (e.g. https://github.com/microsoft/vscode-remote-try-go)
  3. Select either "Create a unique volume" or "Create a new volume"

Output:

[7 ms] Remote-Containers 0.166.1 in VS Code 1.55.1 (08a217c4d27a02a5bcde898fd7981bda5b49391b).
[345 ms] Start: Resolving Remote
[348 ms] Start: Check Docker is running
[348 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[711 ms] Server API version: 1.41
[713 ms] Start: Run: docker volume ls -q
[1097 ms] Start: Run: docker volume create --label vsch.local.repository=https://github.com/microsoft/vscode-remote-try-go --label vsch.local.repository.unique=true vscode-remote-try-go-c988b944cb6f625015fbf2724d594c80
[1517 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=https://github.com/microsoft/vscode-remote-try-go --filter label=vsch.local.repository.volume=vscode-remote-try-go-c988b944cb6f625015fbf2724d594c80 --filter label=vsch.local.repository.folder=vscode-remote-try-go --filter label=vsch.quality=stable
[1950 ms] Start: Run: docker build -f c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-containers-0.166.1\scripts\volumeBootstrap.Dockerfile -t vsc-volume-bootstrap c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-containers-0.166.1\scripts

[+] Building 44.6s (5/5) FINISHED
 => [internal] load build definition from volumeBootstrap.Dockerfile                                                                                                                                 0.0s
 => => transferring dockerfile: 47B                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/alpine:3.13.2                                                                                                                                     1.8s
 => CACHED [1/2] FROM docker.io/library/alpine:3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be                                                                        0.0s
 => ERROR [2/2] RUN apk add --no-cache  nodejs  git  openssh-client  docker-cli  docker-compose  ;                                                                                                  42.6s
------
 > [2/2] RUN apk add --no-cache         nodejs  git     openssh-client  docker-cli                                                                                                                       d
ocker-compose   ;:
#5 0.387 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
#5 21.53 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
#5 21.53 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: network error (check Internet connection and firewall)
#5 42.60 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: network error (check Internet connection and firewall)
#5 42.60 ERROR: unable to select packages:
#5 42.60   docker-cli (no such package):
#5 42.60     required by: world[docker-cli]
#5 42.60   docker-compose (no such package):
#5 42.60     required by: world[docker-compose]
#5 42.60   git (no such package):
#5 42.60     required by: world[git]
#5 42.60   nodejs (no such package):
#5 42.60     required by: world[nodejs]
#5 42.60   openssh-client (no such package):
#5 42.60     required by: world[openssh-client]
------
executor failed running [/bin/sh -c apk add --no-cache  nodejs  git     openssh-client                                                                                                                   d
ocker-cli       docker-compose  ;]: exit code: 5
[47331 ms] Command failed: docker build -f c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-containers-0.166.1\scripts\volumeBootstrap.Dockerfile -t vsc-volume-bootstrap c:\Users\User\.vscode\extensions\ms-vscode-remote.remote-containers-0.166.1\scripts

Workaround:
If I edit the volumeBoostrap.Dockerfile and add proxy env vars then it works but this is hardly ideal as it would have to be done after every update of the extension.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.