The following error is reported when kaniko executes a COPY command
INFO[0001] Unpacking rootfs as cmd COPY ./hello.txt /workspace requires it.
panic: error building stage: failed to get files used from context: failed to get fileinfo for dir:/workspace/hello.txt: lstat dir:/workspace/hello.txt: no such file or directory
goroutine 1 [running]:
main.exportTarball()
/go/src/kaniko-app/main.go:57 +0xff0
main.main()
/go/src/kaniko-app/main.go:36 +0x8a
Issue
The following error is reported when kaniko executes a
COPY
commandThis problem is discussed here: https://github.com/GoogleContainerTools/kaniko/issues/1723
Solution
Change the
srcContext
fromdir:///xxxxx
to/xxxxx