question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debian based Distroless, UBI 8 based build, native-image troubles might ensue

See original GitHub issue

Describe the bug

As I added a distroless setup to AWT graphics Quickstart: https://github.com/quarkusio/quarkus-quickstarts/pull/961 (depends on #20850), it struck me as odd that all quickstarts, including those potentially sensitive to native libs such as Tika, use quay.io/quarkus/quarkus-distroless-image:1.0 (yaml) as their base, which is in fact Debian based.

Quarkus native executable is thus built using UBI 8 based builder image and then copied into Debian userland, with Debian libz copied over, hoping for the best, see (yaml).

I used ubi-micro for the AWT quickstart distroless, manually copying necessary libraries from ubi-minimal, which is somewhat frail, although better off than if I attempted to use Debian libs to satisfy UBI dependencies…

I find such setup fragile. It seems to me that if we aim for truly minimalistic setup, we should be working with ubi-micro.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
matthyxcommented, Oct 28, 2021

Ubi Micro is really big to compete against the current setup. We need to have images around 50Mb, even less, Ubi micro exceeds 100Mb alone if I’m not mistaken.

That’s not my observation. Seems to be 13 MB compressed (UBI 8 micro) and ~39MB on disk. https://hub.docker.com/r/redhat/ubi8-micro/tags

$ podman images | grep ubi8-micro
docker.io/redhat/ubi8-micro                                                     latest      c5ba898d3645  2 months ago   38.9 MB

yes, I think @cescoffier was referring to ubi-minimal, but the equivalent of distroless is ubi-micro

1reaction
matthyxcommented, Oct 28, 2021

Good point @Karm it’s true that libraries aren’t 1:1 equivalent. I can take the point and migrate to ubi-micro… if someone can assign me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why distroless containers aren't the security solution you think ...
So-called "distroless" container images are typically very slimmed down user space environments without package managers, shells or other apps ...
Read more >
Distroless Containers: Hype or True Value? - HackerNoon
Usually, Linux distribution based docker images contain tons of stuff you won't ever need, but hackers can use it to hack into your...
Read more >
Which Container Images To Use — Distroless Or Alpine?
In this article, I am going to create a Java Application container using Distroless and using Alpine image, run vulnerability scans on both,...
Read more >
Smaller docker images with Distroless and Native Image
Packaging applications built with GraalVM native image to docker images is very straightforward. The binaries native-image produces are ...
Read more >
What's Inside Of a Distroless Container Image - iximiuz
GoogleContainerTools' distroless base images are often mentioned as one ... Will it reveal any non-obvious problems with scratch containers?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found