Skip to content

Add Dart example - #2196

Merged
loosebazooka merged 3 commits into
GoogleContainerTools:mainfrom
athomas:add-dart-example
Sep 24, 2026
Merged

loosebazooka merged 3 commits into
GoogleContainerTools:mainfrom
athomas:add-dart-example

Conversation

@athomas

@athomas athomas commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Adds examples/dart, which builds a Dart app with 'dart build cli' (following the official dart Docker image) and runs the resulting bundle on gcr.io/distroless/base-debian13. Dart AOT executables only link against glibc, so the base image is sufficient; it also provides the CA certificates and tzdata used by dart:io.

Adds examples/dart, which builds a Dart app with 'dart build cli' (following the official dart Docker image) and runs the resulting bundle on gcr.io/distroless/base-debian13 instead of scratch + /runtime/. Dart AOT executables only link against glibc, so the base image is sufficient; it also provides the CA certificates and tzdata used by dart:io.
@loosebazooka

Copy link
Copy Markdown
Member

Does dart use libssl?

Comment thread examples/dart/pubspec.yaml Outdated
@athomas

athomas commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Does dart use libssl?

No, it doesn't: Dart bundles its own BoringSSL. The example executable only links against libc, libm, libdl and libpthread.

@loosebazooka

Copy link
Copy Markdown
Member

It's possible you can get away with using the base-nossl image

Dart bundles its own BoringSSL and does not use the system libssl, so the nossl variant is sufficient. It still provides the CA certificates used by dart:io for HTTPS.
@athomas

athomas commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

It's possible you can get away with using the base-nossl image

Ah, cool, yes that works, too!

@loosebazooka
loosebazooka merged commit 51b95b0 into GoogleContainerTools:main Sep 24, 2026
15 checks passed
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.

3 participants