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

Incorrect ARG warning in multistage dockerfile #66

Open
ngan opened this issue Apr 3, 2020 · 0 comments
Open

Incorrect ARG warning in multistage dockerfile #66

ngan opened this issue Apr 3, 2020 · 0 comments

Comments

@ngan
Copy link

ngan commented Apr 3, 2020

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

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