feat: replace ubuntu base image with chainguard static
Motivation/summary
See https://edu.chainguard.dev/chainguard/chainguard-images/reference/static/
Migrate docker base image to cgr.dev/chainguard/static:latest. This Image has a single user nonroot with uid 65532, belonging to gid 65532. The image produced from the make task went from 196Mb to 61Mb.
Remove tini as it's currently included in docker and call the apm-server binary directly in the entrypoint.
Checklist
- [ ] Update CHANGELOG.asciidoc
- [ ] Documentation has been updated
For functional changes, consider:
- Is it observable through the addition of either logging or metrics?
- Is its use being published in telemetry to enable product improvement?
- Have system tests been added to avoid regression?
How to test these changes
Related issues
Closes https://github.com/elastic/apm-server/issues/11918 Blocked by https://github.com/elastic/apm-server/issues/12670
This pull request does not have a backport label. Could you fix it @kruskall? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:
-
backport-7.17is the label to automatically backport to the 7.17 branch. -
backport-8./dis the label to automatically backport to the8./dbranch./dis the digit.
NOTE: backport-skip has been added to this pull request.
This pull request is now in conflicts. Could you fix it @kruskall? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b feat/chainguard-image upstream/feat/chainguard-image
git merge upstream/main
git push upstream feat/chainguard-image
Finished running the smoke test on ubuntu, debian, amazon linux 2 and RHEL. They all completed successfully.
I've just created a feature branch to see if the packaging in the DRA works as expected:
- https://buildkite.com/elastic/apm-server-package/builds/2037