Closed Ramblurr closed 3 weeks ago
could you try with babashka-unwrapped
instead on babashka
?
Wow. babashka-unwrapped
produces a tarball of 46M, compared to babashka
which produces 624M.
What is the difference? I thought the wrapped version just provided readline functionality?
The :deps entry is managed by deps.clj and requires a java installation to resolve and download dependencies.
The JDK. Babashka requires a java installation to resolve and download dependencies
The JDK. Babashka requires a java installation to resolve and download dependencies
Hm ok, that makes sense, I was wondering why the JDK was being dragged along.
Thanks for your responses your time :pray: !
Yep, copy/paste error, too many things in parallel. I updated the comment with what I wanted to paste
Describe the bug
Building an OCI container image that includes babashka results in an unexpectedly large image size of over 600MB (the .tar.gz).
The image contains many unnecessary dependencies like openjdk 21, GTK3, systemd, cups, and ICU that aren't required for babashka's core functionality.
Steps To Reproduce
Create a minimal nix file with this content:
Build the image:
nix-build
ls -alh $(readlink result)
-> the resulting tar.gz iz over 600 MLoad and analyze with dive:
sudo docker load < result; sudo dive babashka-test:latest
Expected behavior
The container image should only include babashka and its essential runtime dependencies, resulting in a much smaller image size (likely <100MB).
I can download and extract babashka from https://github.com/babashka/babashka/releases (the
babashka-1.12.194-linux-amd64-static.tar.gz
) and get a self contained binary that is 65M.Screenshots
Using dive, the final layer shows many unnecessary dependencies:
🖼️ Screenshot: Largest packages from Just the final layer (click)
![image](https://github.com/user-attachments/assets/bd28eba4-f070-4904-9231-8b69edbe1ed4)🖼️ Screenshot: The largest packages from all the layers (click)
![image](https://github.com/user-attachments/assets/70ee5f86-7dc3-45cf-84f2-b1efae0616e7)Notify maintainers
@bandresen @bhougland @DerGuteMoritz @jlesquembre @thiagokokada