Skip to content

FROM ${TARGETARCH} wrongly detected as "base name should not be blank" #4012

@timon-schelling

Description

@timon-schelling

Dockers build in automatic platform args in the global scope should be recognized and should not be annotated as missing.
https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

Example:

FROM alpine:latest as amd64
COPY /appbin/x86_64-unknown-linux-gnu/bin /app
RUN chmod +x /app

FROM alpine:latest as arm
COPY /appbin/armv7-unknown-linux-gnueabihf/bin /app
RUN chmod +x /app

FROM ${TARGETARCH} as build
FROM scratch
COPY --from=build /app /app
ENTRYPOINT ["/app"]

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions