Skip to content

Add mirror/keyserver override support across feature installers#1620

Open
bbartels wants to merge 30 commits intodevcontainers:mainfrom
bbartels:main
Open

Add mirror/keyserver override support across feature installers#1620
bbartels wants to merge 30 commits intodevcontainers:mainfrom
bbartels:main

Conversation

@bbartels
Copy link
Copy Markdown

This PR makes feature install scripts mirror/proxy-friendly by introducing env-var-based download base URL overrides while preserving existing defaults when unset. It also adds cross-script keyserver override behavior and updates PowerShell/Ruby/dotnet flows where URL resolution/bootstrap behavior needed structural changes.

  • Cross-cutting mirror/keyserver support

    • Added GITHUB_RELEASE_MIRROR support (via local GITHUB_RELEASE_URL) for GitHub Releases HTTP artifact downloads in affected scripts.
    • Updated shared get_gpg_key_servers() probing helpers to honor GPG_KEYSERVER as a single authoritative keyserver when provided.
  • Per-feature URL override additions

    • github-cli: GitHub release .deb downloads now use GITHUB_RELEASE_URL.
    • nvidia-cuda: NVIDIA_REPO_URL now derives from NVIDIA_MIRROR.
    • rust: exported/persisted RUSTUP_DIST_SERVER and RUSTUP_UPDATE_ROOT.
    • go: added GO_MIRROR for tarball/signature downloads and GO_TAG_SOURCE for tag resolution.
    • node: added/exported NVM_NODEJS_ORG_MIRROR and threaded it across su ... -c boundaries.
    • java: added ADOPTIUM_API_URL (ADOPTIUM_MIRROR), and SDKMAN_SERVICE_MIRROR support via sdkman_api config rewrite.
    • php: added PHP_MIRROR, COMPOSER_MIRROR, COMPOSER_SIG_MIRROR.
    • powershell: added MICROSOFT_PACKAGES_MIRROR + GITHUB_RELEASE_URL; replaced hardcoded Microsoft/GitHub download bases.
    • kubectl-helm-minikube: added KUBECTL_MIRROR, HELM_MIRROR, MINIKUBE_MIRROR, GITHUB_RELEASE_URL; removed non-configurable kubectl fallback URL.
    • python: added PYTHON_MIRROR + GITHUB_RELEASE_URL for CPython/cosign artifacts.
    • terraform: retained CUSTOM_DOWNLOAD_SERVER; added GITHUB_RELEASE_URL for satellite tools and HASHICORP_KEY_URL (HASHICORP_GPG_KEY_MIRROR) for Noble key fetch path.
    • docker-in-docker: added GITHUB_RELEASE_MIRROR, MICROSOFT_PACKAGES_MIRROR, DOCKER_MIRROR support for compose/buildx/switch, Microsoft repo assets, and Docker CE repo/key setup.
  • Required structural adjustments

    • PowerShell: removed aka.ms/powershell-release redirect-based version resolution path; version selection now relies on existing git-tag helpers.
    • Ruby:
      • Added optional git-based RVM bootstrap path when RVM_INSTALL_MIRROR is set (.../rvm/rvm.git + binscripts/rvm-installer stable ...).
      • Added /etc/rvmrc mirror entries for rvm_rubies_url and rvm_binaries_url when corresponding vars are set.
    • Dotnet:
      • DOTNET_RELEASES_INDEX_URL now uses DOTNET_RELEASES_MIRROR fallback pattern.
      • install_sdk() and install_runtime() now append --azure-feed "${DOTNET_RELEASES_MIRROR}" when set.

Example pattern applied across scripts:

GITHUB_RELEASE_URL="${GITHUB_RELEASE_MIRROR:-https://github.com}"
curl -fsSL -o artifact.deb "${GITHUB_RELEASE_URL}/owner/repo/releases/download/v${VERSION}/artifact.deb"

Copilot AI and others added 9 commits April 13, 2026 23:23
…support

Add mirror/keyserver override support across feature installers (incl. dotnet feed wiring)
@bbartels bbartels requested a review from a team as a code owner April 13, 2026 23:53
@bbartels
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Copilot AI and others added 8 commits April 14, 2026 00:03
fix: make PowerShell aka.ms version resolution resilient with fallback
Comment thread src/powershell/install.sh Outdated
Comment thread src/powershell/install.sh
Co-authored-by: Benjamin Bartels <benjamin@bartels.dev>
Comment thread src/powershell/install.sh Outdated
Comment thread src/terraform/install.sh
Comment thread src/terraform/install.sh Outdated
Comment thread src/kubectl-helm-minikube/install.sh Outdated
Comment thread src/kubectl-helm-minikube/install.sh
Co-authored-by: Benjamin Bartels <benjamin@bartels.dev>
Comment thread src/kubectl-helm-minikube/install.sh Outdated
Copilot AI and others added 2 commits April 14, 2026 01:19
Bump minor feature versions for mirror/keyserver-updated manifests
@bbartels
Copy link
Copy Markdown
Author

Hi @abdurriq , we've been trying to get devcontainers to work internally. Unfortunately, we have an air-gapped on-prem setup here with an artifactory proxy that allows us to mirror releases/package repositories etc. This PR makes it so that an initial batch of features support overriding artifact urls so we dont need to maintain an internal fork that overrides baseurls.

Comment thread src/go/install.sh Outdated
Co-authored-by: Benjamin Bartels <benjamin@bartels.dev>
Comment thread src/kubectl-helm-minikube/install.sh
Comment thread src/kubectl-helm-minikube/install.sh Outdated
Comment thread src/php/install.sh Outdated
bbartels and others added 2 commits April 15, 2026 17:40
Co-authored-by: Benjamin Bartels <benjamin@bartels.dev>
INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"false"}"
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
MICROSOFT_GPG_KEYS_ROLLING_URI="https://packages.microsoft.com/keys/microsoft-rolling.asc"
MICROSOFT_PACKAGES_MIRROR="${MICROSOFT_PACKAGES_MIRROR:-https://packages.microsoft.com}"
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bbartels

Thank you for the contribution. However adding parameters such as the above MICROSOFT_PACKAGES_MIRROR in the installation script doesn't appear to be the complete solution for using custom mirror/ repository paths unless the respective input parameters are added in the feature configuration. Also it could be great to have additional test cases with those input parameters for respective features. Kindly let me know in case of any clarification.

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

Successfully merging this pull request may close these issues.

3 participants