4 ms·
You could probably whitelist with a .dockerignore like * # exclude everything !README.md # include the README. !run.sh # include the
by Estragon 11y ago
You could probably whitelist with a .dockerignore like
* # exclude everything
!README.md # include the README.
!run.sh # include the initiation script
You would want to check exactly what the globbing rules are for the .dockerignore file, though. I don't know whether '*' will catch .dotfiles, for instance.
https://docs.docker.com/engine/reference/builder/#dockerignore-file
https://golang.org/pkg/path/filepath/#Match
- hinkley 11y agoThat's it, thanks for following up in my absence. There are a couple of frameworks where all of the production files end up in, for instance /dist and one other directory. Rather than having to constantly blacklist everything you just say "ignore everything except X and Y"