1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-08 22:36:41 +02:00

exclude git for docker archive

This commit is contained in:
Lee Brown
2019-07-14 01:26:05 -08:00
parent a672b56d5d
commit d16855ead9

View File

@ -905,7 +905,9 @@ func ServiceDeploy(log *log.Logger, req *serviceDeployRequest) error {
log.Println("Starting docker build")
// Create tar file of repository for service.
buildCtx, err := archive.TarWithOptions(req.ProjectRoot, &archive.TarOptions{})
buildCtx, err := archive.TarWithOptions(req.ProjectRoot, &archive.TarOptions{
ExcludePatterns: []string{".git/*"},
})
if err != nil {
return errors.Wrap(err, "Failed to create docker build context")
}