Skip to content

Agent image build fails where proxy.golang.org is unreachable #1077

Done

Description

@isadeks

Problem

Since #1052 (commit fe2d61cb), agent/Dockerfile builds gh from source through the public Go module proxy. That was needed: the pinned dependency github.com/microsoft/dev-tunnels v0.2.0 can no longer be fetched from its Git repository, because the repository has no Go tags left.

A deploy machine that cannot reach proxy.golang.org now fails to build the agent image. Corporate networks often block or redirect that host. On such a network, mise //cdk:deploy fails at this step:

RUN GOBIN=/out go install "github.com/cli/cli/v2/cmd/gh@v${GH_VERSION}"
go: ... Get "https://proxy.golang.org/...": tls: failed to verify certificate

The stack is not touched, but no deploy can go through from that machine. Going back to GOPROXY=direct does not help, because the direct fetch of dev-tunnels fails everywhere.

Fix

Install gh from its official GitHub release, checked against a SHA-256 pinned in agent/Dockerfile for each architecture, instead of building it from source.

  • This needs no Go proxy and no configuration. The image build already depends on github.com.
  • The cost is small. The release binary of 2.103.3 is built with Go 1.27.3, one patch behind the image's previous builder (1.27.4). Trivy reports no fixable HIGH or CRITICAL finding for it beyond the entry agent/.trivyignore already holds.
  • A test pins the checksum check, so a later edit cannot drop it.

Activity

  1. self-assigned this
    on Nov 23, 2026
  2. added
    bug
    approved
    on Nov 23, 2026
  3. isadeks commented on Nov 23, 2026

    @isadeks
    ContributorAuthor

    Starting implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

approvedbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions