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

In alpine container where the first layer is not clearly alpine, we do not detect the OS #1159

Open
pombredanne opened this issue Apr 9, 2024 · 0 comments

Comments

@pombredanne
Copy link
Member

Say I build a container where:

  • the first layer is not using a base image, and contains only something like:COPY /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  • the second layer is essentially an Alpine base image

Since the first layer does not have the /etc/os-release and related, it will not be detected as Alpine.

The same issue may exist with other distros.

The solution is to look at all the layers before deciding on what the primary OS is (and also nothing prohibits to have multiple OS personalities across layers or even in the same layer(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant