Skip to content

Conversation

@simolus3
Copy link
Contributor

@simolus3 simolus3 commented Jan 5, 2026

This updates the readme for the Dart image to recommend the dart build cli command over dart compile exe. While compile exe only compiles the Dart entrypoint into an executable, dart build cli also respects hooks and is able to bundle dynamic libraries needed by the Dart application or a used library.

I have tested the updated Dockerfile with the template described in Creating a Dart server app, both with and without a package dependency requiring hooks and dynamic libraries.

I've also filed an issue to gather feedback from the Dart team first: dart-lang/dart-docker#253

@dcharkes
Copy link

dcharkes commented Jan 5, 2026

Thank you @simolus3! LGTM!

@athomas
Copy link
Contributor

athomas commented Jan 5, 2026

Thanks, LGTM.

A dart build cli layer may be larger then a dart compile exe layer. Customers that use hooks need to make this change anyway and customers and those that don't will see the same behavior as before.

@tianon tianon merged commit 660ac85 into docker-library:master Jan 5, 2026
6 checks passed
@simolus3 simolus3 deleted the dart-build-cli branch January 5, 2026 20:27
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.

4 participants