Skip to content

Add custom Go base container setting#11

Open
shykes wants to merge 1 commit into
mainfrom
custom-go-base-setting
Open

Add custom Go base container setting#11
shykes wants to merge 1 commit into
mainfrom
custom-go-base-setting

Conversation

@shykes
Copy link
Copy Markdown
Contributor

@shykes shykes commented May 16, 2026

Problem

The Go module always built its Go execution containers from golang:<version>-alpine.

That blocked users who need their own Go base container with internal certificates, proxy setup, pinned images, security updates, or preinstalled tools.

Solution

Add a top-level base constructor setting. If base is not set, the module keeps the current golang:<version>-alpine behavior.

Pass that base container through the module and directory execution paths so helpers, tests, and generate use the configured container.

Make version and base mutually exclusive. When base is set, version is null because the image is a black box.

Add e2e coverage that verifies the custom base is used by helper discovery, tests, and generate, and that setting both version and base fails.

Tests

dagger check -m .dagger/modules/e2e

Closes #10

@shykes shykes force-pushed the custom-go-base-setting branch from 8f5448d to e5436a9 Compare May 18, 2026 16:47
Add a top-level base constructor setting for Go execution containers and pass it through module and directory execution paths.

Keep the existing golang:<version>-alpine default when no base is provided.

Treat version and base as mutually exclusive, because a caller-provided base container is a black box. When base is set, expose version as null.

Add e2e coverage for custom base execution, the default version, and the version/base conflict.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes shykes force-pushed the custom-go-base-setting branch from e5436a9 to 61e60f6 Compare May 18, 2026 16:56
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.

Allow custom Go base image

1 participant