statically compiled arm64 pkl binary for usage in distroless containers
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
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!
Contributor guide
Research direction
Start with pkl-cli/pkl-cli.gradle.kts and compare it with the linked commit fbe13d82c0c6b138776c87a8040230deb037b204. Reproduce the arm64 build on Ubuntu, then test the resulting binary in the referenced distroless container. Done means a statically compiled arm64 PKL binary is included among the release artifacts and runs in that container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java, kotlin
- Domain
- build-system, devops, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100