Originally created by @wfairclough on GitHub (Jul 20, 2025).
Hey team, we’re running PKL in arm64 distroless containers and hit a snag: the current PKL release isn’t statically compiled for arm64, so we’re running into dependency issues at runtime. Would it be possible to provide a statically compiled arm64 version of PKL as part of the release artifacts? This would make it much easier to use PKL in minimal container environments.
We really want to use pkl as our go to config language for our services, we love the protection we would get with runtime config validation.
I tried making the changes myself and successfully compiled an arm64 statically compiled binary on an arm64 Ubuntu VM. However, it still did not work in the distroless container. I assumed I must have done something wrong and that I did not actually achieve a static compilation.
The changes I made to the build scripts are here: pkl-cli/pkl-cli.gradle.kts
Thanks!
Originally created by @wfairclough on GitHub (Jul 20, 2025).
Hey team, we’re running PKL in arm64 [distroless](https://github.com/GoogleContainerTools/distroless/tree/main/base) containers and hit a snag: the current PKL release isn’t statically compiled for arm64, so we’re running into dependency issues at runtime. Would it be possible to provide a statically compiled arm64 version of PKL as part of the release artifacts? This would make it much easier to use PKL in minimal container environments.
We really want to use pkl as our go to config language for our services, we love the protection we would get with runtime config validation.
I tried making the changes myself and successfully compiled an arm64 statically compiled binary on an arm64 Ubuntu VM. However, it still did not work in the distroless container. I assumed I must have done something wrong and that I did not actually achieve a static compilation.
The changes I made to the build scripts are here: [pkl-cli/pkl-cli.gradle.kts](https://github.com/wfairclough/pkl/commit/fbe13d82c0c6b138776c87a8040230deb037b204#diff-bdf5449abccf0b8046f34537181924829541b9bf179ffbebba04a2f407c59f7b)
Thanks!
The existing linux/arm64 executable is a "mostly static", where it dynamically links to glibc and libstd++. Can you try using distroless/cc as your base image? That should have all the dependencies that Pkl needs.
@bioball commented on GitHub (Jul 22, 2025):
The existing linux/arm64 executable is a "mostly static", where it dynamically links to glibc and libstd++. Can you try using `distroless/cc` as your base image? That should have all the dependencies that Pkl needs.
@bioball, thank you for your suggestion. I tried that as well, but it seems there are more missing dependencies.
@wfairclough commented on GitHub (Jul 22, 2025):
@bioball, thank you for your suggestion. I tried that as well, but it seems there are more missing dependencies.
<img width="962" height="232" alt="Image" src="https://github.com/user-attachments/assets/75875ec2-6ab8-4231-b80a-6cc8856bc322" />
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @wfairclough on GitHub (Jul 20, 2025).
Hey team, we’re running PKL in arm64 distroless containers and hit a snag: the current PKL release isn’t statically compiled for arm64, so we’re running into dependency issues at runtime. Would it be possible to provide a statically compiled arm64 version of PKL as part of the release artifacts? This would make it much easier to use PKL in minimal container environments.
We really want to use pkl as our go to config language for our services, we love the protection we would get with runtime config validation.
I tried making the changes myself and successfully compiled an arm64 statically compiled binary on an arm64 Ubuntu VM. However, it still did not work in the distroless container. I assumed I must have done something wrong and that I did not actually achieve a static compilation.
The changes I made to the build scripts are here: pkl-cli/pkl-cli.gradle.kts
Thanks!
@bioball commented on GitHub (Jul 22, 2025):
The existing linux/arm64 executable is a "mostly static", where it dynamically links to glibc and libstd++. Can you try using
distroless/ccas your base image? That should have all the dependencies that Pkl needs.@wfairclough commented on GitHub (Jul 22, 2025):
@bioball, thank you for your suggestion. I tried that as well, but it seems there are more missing dependencies.