When I try to add (ADD) a remote file using an ENV variable, the Kaniko build fails. Here is a test case:
FROM busybox
ENV TEST_PLAN https://raw.githubusercontent.com/GoogleContainerTools/kaniko/master/docs/testplan.md
RUN echo $TEST_PLAN
ADD $TEST_PLAN ./plan.md
Here is the error:
error building image: error building stage: lstat /workspace/https:/raw.githubusercontent.com/GoogleContainerTools/kaniko/master/docs/testplan.md: no such file or directory
I am using local dir workspace as my build context.
The above Dockerfile works fine with both Docker and Buildah.
Is this a limitation of Kaniko? Or is there a possible workaround available?