Skip to content

feat(build): support build networking flags for exec steps - #630

Open
iloveitaly wants to merge 1 commit into
railwayapp:mainfrom
iloveitaly:build/networking
Open

feat(build): support build networking flags for exec steps#630
iloveitaly wants to merge 1 commit into
railwayapp:mainfrom
iloveitaly:build/networking

Conversation

@iloveitaly

Copy link
Copy Markdown
Collaborator

Motivation

docker buildx --network and --add-host were ignored by the Railpack frontend, so build-time network access did not match Dockerfile behavior.

Description

Parse the same dockerui frontend opts as the Dockerfile frontend (force-network-mode, add-hosts) and apply them to plan exec steps via llb.Network / llb.AddExtraHost. Document the Docker and BuildKit usage.

Test

  • Unit tests for network opt parsing (network_opts_test.go)
  • Convert-path tests that network mode and extra hosts flow through to LLB (convert_network_test.go)

Links

Fixes #145

* Add support for `--network` and `--add-host` flags by parsing frontend options compatible with the Dockerfile frontend (e.g., `force-network-mode` and `add-hosts`).
* Apply these network configurations to plan exec steps, ensuring build-time network access matches standard Dockerfile behavior.
* Update documentation to include build networking references and usage examples for both Docker and BuildKit.

Generated-by: aiautocommit
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.

Cannot specify custom network for buildkit with railpack

1 participant