Skip to content

Commit

Permalink
init: add .dockerignore to sync ignore if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasGentele committed Jun 21, 2022
1 parent aa96cb6 commit 24d2807
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,15 @@ func (cmd *InitCmd) addDevConfig(config *latest.Config, imageName, image string,
devConfig.Sync = []*latest.SyncConfig{}
}

devConfig.Sync = append(devConfig.Sync, &latest.SyncConfig{
syncConfig := &latest.SyncConfig{
Path: "./",
})
}

if _, err := os.Stat(".dockerignore"); err == nil {
syncConfig.UploadExcludeFile = ".dockerignore"
}

devConfig.Sync = append(devConfig.Sync, syncConfig)

devConfig.Terminal = &latest.Terminal{
Command: "./" + startScriptName,
Expand Down

0 comments on commit 24d2807

Please sign in to comment.