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

feat: migrate default docker image to ubi-micro #14786

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Dec 2, 2024

Motivation/summary

In line with other products and with the direction in #13872 we want to drop ubuntu and use ubi base images for the default image.

Similar to what we did with the chainguard image, the image is pinned to a digest for security/reproducibility and tini is dropped since it's not needed in modern docker versions.

Checklist

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

docker build . -f packaging/docker/Dockerfile -t ubi-micro-apm-server --build-arg GOLANG_VERSION=1.23
docker run ubi-micro-apm-server (note if you don't pass an elasticsearch url it will use elasticsearch by default).

Related issues

@kruskall kruskall requested a review from a team as a code owner December 2, 2024 20:28
@kruskall kruskall added the backport-skip Skip notification from the automated backport with mergify label Dec 2, 2024
@kruskall kruskall requested a review from axw December 2, 2024 20:40
rubvs
rubvs previously approved these changes Dec 2, 2024
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the tini & docker-entrypoint files?

@kruskall kruskall requested review from axw and a team December 3, 2024 09:42
@kruskall
Copy link
Member Author

kruskall commented Dec 3, 2024

Done! 😄

@v1v
Copy link
Member

v1v commented Dec 3, 2024

Out of curiosity, I've seen tini is not needed when using ub9, if that's correct, does it mean we can remove

- filename: tinit
url: https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64
validation:
type: sha256
value: 93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c
in a follow-up?

@kruskall
Copy link
Member Author

kruskall commented Dec 3, 2024

Out of curiosity, I've seen tini is not needed when using ub9, if that's correct, does it mean we can remove

tini is not needed in recent docker versions because it's included in docker (kubernetes is in a similar position) so we just need to ensure we're running the binary directly without wrapping it in a shell script.
ironbank images are another issue but yes, it should probably be removed along with switching the ironbank image to chainguard static.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @kruskall!

@kruskall kruskall enabled auto-merge (squash) December 4, 2024 08:46
@kruskall kruskall merged commit ab2a066 into elastic:main Dec 4, 2024
11 checks passed
@kruskall kruskall deleted the feat/ubi-default-docker branch December 4, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants