Exceptions in .dockerignore

后端 未结 3 1191
天命终不由人
天命终不由人 2021-01-11 19:35

How does .dockerignore handle exceptions?

For example, I would like to ignore everything from the src/ directory except for src/web/p

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-11 19:49

    Just wanted to add in case others run into this question, that from docker 1.7.0 exclusions are supported in the .dockerignore file. So the example !src/web/public in the question actually works

    https://docs.docker.com/engine/reference/builder/#dockerignore-file

提交回复
热议问题