I have directory csv
in context directory of docker build
. I want to copy it into docker image in all circumstances (for empty directory in host an empty directory inside image is created, for nonempty directory in host it is copied with all content).
The COPY csv/* /csv/
gives COPY failed: no source files were specified
error when the directory is empty.
Similar questions I found on SO are differing from my case in either setup or intention (multistage build, copying existing jar, certainly existing file) so I choose Q&A-style here rather than messing question with unrelated answer. This Github issue is also related.