Skip to content

build/Dockerfile defines ARG before FROM #4584

@nresare

Description

@nresare

When looking at build/Dockerfile it seems it should be configurable which binary it will use, but due to a peculiarity of the Dockerfile format, the value of BINARY will only every be 'flipt'.

The relevant detail, in the Dockerfile reference:

An ARG declared before a FROM is outside of a build stage, so it can't be used in any instruction after a FROM.

It turns out that it is not quite true, it seems from experimentation that the default value of BINARY will still be accessible, it is just not configurable at build time. Moreover, any docker build invocation will print the following warning:

 1 warning found (use docker --debug to expand):
 - UndefinedVar: Usage of undefined variable '$BINARY' (line 14)

I would suggest either removing the configurability of BINARY by simply hard coding it in the COPY line, or moving the ARG below the FROM line

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions