1

I have command snippet like below;

COPY ../* ./
RUN echo "FileLogger: start"
RUN echo ls
RUN echo "FileLogger: end"

but this does not output files/folders copied into the target. What command I can use to list nested folders/files copied over the image?

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
  • What *does* it output? How does the output differ from what you expect? – larsks Oct 25 '22 at 02:57
  • You can't `COPY ../...` into an image from outside the build-context directory; [How to include files outside of Docker's build context?](https://stackoverflow.com/questions/27068596/how-to-include-files-outside-of-dockers-build-context) Is there anything in the _current_ directory besides the `Dockerfile`? Do you mean to `RUN ls` and not `RUN echo ...` in the third line? – David Maze Oct 25 '22 at 10:25

1 Answers1

0

You have to remove * from COPY command.

COPY ../ ./

And if you want to list sub-folder structure, I would suggest to use ls -laRt

Abhishek S
  • 546
  • 3
  • 16