DefangLabs / samples

Samples to show you how to create and deploy apps with Defang.
1 stars 2 forks source link

Add a reasonable default `.dockerignore` file to the samples. #44

Open edwardrf opened 5 months ago

edwardrf commented 5 months ago

Right now, many samples does not contain a .dockerignore file, and for some framework/language, a local build could result in locally cached lib or generated files left in the directory, for example, node_modules for nodejs, or the built binary for go projects, these would be included in the local build context which results a deployment failure.

lionello commented 3 months ago

FYI: we always default to a built-in . dockerignore file:

https://github.com/DefangLabs/defang/blob/fe09a7092b3346a2d95b6d804301080622b157c5/src/pkg/cli/compose/context.go#L39-L57