Exclude a folder from a docker build COPY command without .dockerignore

Viewed 1153

I have a repository that I would like to build an image for. There are multiple folders in there and I would like to exclude one called 'solver'. Using a dockerignore file is not an option.

I have tried:

COPY ./[(^solver)] ./
COPY ./[(^solver)]* ./
COPY ./[^solver] ./

However these are not working.

The second solution in this post does not solve my problem.

0 Answers
Related