mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-21 12:33:00 +02:00
parse arg commands at the top of dockerfiles (#404)
* parse arg commands at the top of dockerfiles * fix pointer reference bug and remove debugging * fixing tests * account for meta args with no value * don't take fs snapshot if / is the only changed path * move metaArgs inside KanikoStage * removing unused property * check for any directory instead of just / * remove unnecessary check
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
ARG REGISTRY=gcr.io
|
||||
ARG REPO=google-appengine
|
||||
ARG WORD=hello
|
||||
ARG W0RD2=hey
|
||||
|
||||
FROM ${REGISTRY}/${REPO}/debian9 as stage1
|
||||
|
||||
# Should evaluate WORD and create /tmp/hello
|
||||
ARG WORD
|
||||
RUN touch /${WORD}
|
||||
|
||||
FROM ${REGISTRY}/${REPO}/debian9
|
||||
|
||||
COPY --from=stage1 /hello /tmp
|
||||
|
||||
# /tmp/hey should not get created without the ARG statement
|
||||
RUN touch /tmp/${WORD2}
|
||||
Reference in New Issue
Block a user