Open yossicohn opened 7 months ago
Thanks for filing the bug @yossicohn ; could you specify the version of kaniko you're using and which release is the workable one?
@JeromeJu the latest I know of working is v1.12.0, in the process of upgrade to the latest I got all the issues of the COPY I mentioned above
Hi @yossicohn could you provide whats is the error or the behavior in your case? is it file not found, is it error or something else?
@prima101112
Examples and most painful
COPY . .
I get no error, but it does not copy anything vs. the original behavior of copying all the context files.
if I do
COPY ./ssh/* ./ssh
I get an error
{"level":"info","msg":"Resolving srcs [.ssh/*]...","time":"2024-04-02T08:40:22Z"} error building image: error building stage: failed to get files used from context: copy failed: no source files specified
Same for other wildcards usages like *.json
etc.
btw, the following does work
COPY ./ssh ./ssh
tested master branch with
COPY ./* ./
its copy all files.
but dunno with COPY ./ ./
is the docker behavior will copy all files?
cc : @JeromeJu
@prima101112 as far as I can see the copied content via COPY ./* ./
is not really working, as it is not available.
I tried it and the Folders are not available, cd into the folders fails
drwxrwxrwx 1 root root 31 Apr 24 06:52 .
drwxr-xr-x 1 root root 40 Apr 24 06:53 ..
lrwxrwxrwx 1 root root 51 Apr 24 06:52 myfolder -> .worktrees/e15ba753ddeafecc38225a329b90f69a9ef70545
# cd myfolder
/bin/sh: cd: can't cd to myfolder: No such file or directory
Regarding COPY ./ ./
or COPY ./ssh/* ./ssh
or COPY ./*.json ./
all these are not working as for v1.22 and are very needed behavior and feature
Can you recheck this?
@prima101112 hi, FYI I've just tested the version v1.23.0
and the issues describes still persist
@yossicohn will check it
Hi @yossicohn just try and test using latest 1.23 and its work fine
INFO[0004] Initializing snapshotter ...
INFO[0004] Taking snapshot of full filesystem...
INFO[0004] Cmd: /bin/sh
INFO[0004] Args: [-c mkdir -p /etc/ssh/testfolder]
INFO[0004] Running: [/bin/sh -c mkdir -p /etc/ssh/testfolder]
INFO[0004] Taking snapshot of full filesystem...
INFO[0004] WORKDIR /app
INFO[0004] Cmd: workdir
INFO[0004] Changed working directory to /app
INFO[0004] Creating directory /app with uid -1 and gid -1
INFO[0004] Taking snapshot of files...
INFO[0004] COPY . .
INFO[0004] Taking snapshot of files...
INFO[0004] RUN ls /app
INFO[0004] Cmd: /bin/sh
INFO[0004] Args: [-c ls /app]
INFO[0004] Running: [/bin/sh -c ls /app]
Dockerfile
config.json
howtorun.txt
known
INFO[0004] Taking snapshot of full filesystem...
INFO[0004] No files were changed, appending empty layer to config. No layer added to image.
INFO[0004] Skipping push to container registry due to --no-push flag
I got similar error but related to --from. Issue seems that kaniko does not support fully qualified image names including registry. adding FROM
Wildcard in copy still seems to fail, even in the latest version
INFO[0008] COPY ../package.json ./
INFO[0008] Taking snapshot of files...
INFO[0008] Resolving srcs [../*-lock.json]...
WARN[0008] No files to copy
INFO[0008] COPY ../*-lock.json ./
INFO[0008] Resolving srcs [../*-lock.json]...
INFO[0008] Taking snapshot of full filesystem...
INFO[0009] No files were changed, appending empty layer to config. No layer added to image.
INFO[0009] RUN ls -la
INFO[0009] Cmd: /bin/sh
INFO[0009] Args: [-c ls -la]
INFO[0009] Running: [/bin/sh -c ls -la]
total 12
drwxr-xr-x 2 root root 4096 Nov 1 17:17 .
drwxr-xr-x 1 root root 4096 Nov 1 17:17 ..
-rw-r--r-- 1 root root 1042 Nov 1 17:17 package.json
Actual behavior Does not COPY or fails Tested with KANIKO 1.22 still a bug both will fail:
COPY ./* ./
orCOPY ./*.json ./
Expected behavior Copy all Files as defined by the wildcard btw,
COPY ./ ./
used to work onceTo Reproduce Steps to reproduce the behavior:
COPY ./* ./
orCOPY ./*.json ./
Additional Information This is painful bug