使用以下Dockerfile从COPY中删除星号:
FROM ubuntuCOPY files/ /files/RUN ls -la /files/*
结构在那里:
$ docker build .Sending build context to Docker daemon 5.632 kBSending build context to Docker daemon Step 0 : FROM ubuntu ---> d0955f21bf24Step 1 : COPY files/ /files/ ---> 5cc4ae8708a6Removing intermediate container c6f7f7ec8ccfStep 2 : RUN ls -la /files/* ---> Running in 08ab9a1e042f/files/folder1:total 8drwxr-xr-x 2 root root 4096 May 13 16:04 .drwxr-xr-x 4 root root 4096 May 13 16:05 ..-rw-r--r-- 1 root root 0 May 13 16:04 file1-rw-r--r-- 1 root root 0 May 13 16:04 file2/files/folder2:total 8drwxr-xr-x 2 root root 4096 May 13 16:04 .drwxr-xr-x 4 root root 4096 May 13 16:05 ..-rw-r--r-- 1 root root 0 May 13 16:04 file1-rw-r--r-- 1 root root 0 May 13 16:04 file2 ---> 03ff0a5d0e4bRemoving intermediate container 08ab9a1e042fSuccessfully built 03ff0a5d0e4b



