Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize mp-server dockerfile size #112

Open
kasper573 opened this issue Dec 28, 2024 · 1 comment
Open

Optimize mp-server dockerfile size #112

kasper573 opened this issue Dec 28, 2024 · 1 comment
Labels
enhancement Enhancement of existing feature refactor Non- user facing code quality improvement

Comments

@kasper573
Copy link
Owner

The current image size is 1.5GB, but alpine + node 22 should only equal ~250mb, and at the time of writing this issue our bundled source code amounts to ~3MB, so 1.5GB is really bad.

Ideally produce a standalone js bundle that only requires node to run.

This is possible and I used to do this in this project with esbuild, but after introducing opentelemetry we can no longer use esbuild due to its node module monkeypatching system. This might be solved some day via open-telemetry/opentelemetry-js#4174.

Find a way!

@kasper573 kasper573 added enhancement Enhancement of existing feature refactor Non- user facing code quality improvement labels Dec 28, 2024
@kasper573
Copy link
Owner Author

I tried using https://github.com/DrewCorlin/opentelemetry-esbuild-plugin-node and it didn't work. The plugin seemed to embed the correct runtime code (I inspected the generated js bundle) and the log outputs from otel seemed to be saying that instrumentation was enabled, but I didn't receive any telemetry in tempo. Not sure if this means that the plugin simply doesn't work or if I just messed up. Giving up on the plugin for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature refactor Non- user facing code quality improvement
Projects
None yet
Development

No branches or pull requests

1 participant