Skip to content

Support custom host-to-IP mappings in bake the same way it's done in build --add-host #494

@unshare

Description

@unshare

See subject.
Ideally, it's better be implemented with --set on a per-target basis.

Activity

johnbizokk

johnbizokk commented on Jan 27, 2022

@johnbizokk

This feature could benefit virtually any virtual testing environment (from load testing to E2E testing), primarily if the remote host is behind the proxy and does not support transparent TCP proxying to the host. Services such as Cloudflare provide transparent TCP proxying, but that can come at the cost of a big buck. Therefore we would like to have an opportunity to remap some hosts during the building process and drop silly workarounds like semi-manual modification of hosts file. Moreover, this feature is an old citizen of the legacy builder.

johnbizokk

johnbizokk commented on Jan 27, 2022

@johnbizokk

It turned out that we cannot modify the hosts file during build time because it is mounted in read-only mode. The last resort is well-designed software that allows the hosts to be overridden, such as cypress (E2E) and k6 (load testing).

added this to the v0.25.0 milestone on Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @tonistiigi@crazy-max@johnbizokk@unshare

      Issue actions

        Support custom host-to-IP mappings in `bake` the same way it's done in `build --add-host` · Issue #494 · docker/buildx