Skip to content

Incorrect ARG warning in multistage dockerfile #66

Open
@ngan

Description

Issue details

If you have an ARG that you'd like to be shared for all stages, the convention is to do the following:

# This is global.
ARG FOO=/path/to/something

FROM alpine:latest as base1
# Call `ARG` with just the key to load the variable from global.
ARG FOO
COPY $FOO/bar .
WORKDIR $FOO

The linter will then say:

COPY contains undefined ARG or ENV
WORKDIR path $FOO must be absolute

Steps to reproduce/test case

See description above

Affected version(s)

master

Activity

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

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