Skip to content

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

Description

@pombredanne

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(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions