Skip to content

feat: replace baseImageAddress with baseImage (Container) - #28

Open
shykes wants to merge 1 commit into
mainfrom
base-image-container
Open

shykes wants to merge 1 commit into
mainfrom
base-image-container

Conversation

@shykes

@shykes shykes commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Replace the baseImageAddress: String! constructor argument with baseImage: Container. A Container argument is more powerful: callers can pass any container, including one built by another module or wired with a dag:// address in workspace settings. An image reference such as baseImage = "node:25-alpine" still works as a setting or CLI flag.

For compatibility, baseImageAddress: String! stays, deprecated, as sugar on top of baseImage:

  • If baseImageAddress is set, the base container is container.from(baseImageAddress).
  • baseImage and baseImageAddress are mutually exclusive. Setting both is an error.
  • If neither is set, the base container is node:25-alpine, as before.

The default of baseImageAddress changes from "node:25-alpine" to "" (unset), because a non-empty default makes it impossible to detect a conflict with baseImage. Callers that set it explicitly see no change.

Note: the argument has @deprecated in the source, but the engine's Dang runtime does not pass argument deprecation to the module schema yet, so the docstring also says "Deprecated".

Tests

dagger call -m . <args> project --path tests/hello_world list:

Arguments Result
(none) lists tests
--base-image node:24-alpine lists tests
--base-image-address node:24-alpine lists tests
both baseImage and baseImageAddress are mutually exclusive: set only baseImage
--base-image registry.invalid/nope:1 image resolve error (argument is used)
--base-image-address registry.invalid/nope:1 image resolve error (argument is used)

baseImage takes a Container, so callers can pass any container, including
one built or wired from another module. baseImageAddress stays as a
deprecated alias: when set, the base container is
container.from(baseImageAddress). Setting both is an error.
@TomChv
TomChv force-pushed the base-image-container branch from 6251fe3 to 51c9781 Compare November 25, 2026 17:02
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.

1 participant