Skip to content

Commit

Permalink
fix: fixed build context option
Browse files Browse the repository at this point in the history
  • Loading branch information
astromechza committed Feb 5, 2024
1 parent ee04030 commit 70058f3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/command/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ func run(cmd *cobra.Command, args []string) error {
//
if buildCtx != "" {
log.Printf("Applying build instructions: '%s'...\n", buildCtx)
// We add the build context to all services and containers here and make a big assumption that all are
// using the image we are building here and now. If this is unexpected, users should use a more complex
// overrides file.
for idx := range proj.Services {
if proj.Services[idx].Name == spec.Metadata.Name {
proj.Services[idx].Build = &types.BuildConfig{Context: buildCtx}
proj.Services[idx].Image = ""
}
proj.Services[idx].Build = &types.BuildConfig{Context: buildCtx}
proj.Services[idx].Image = ""
}
}

Expand Down

0 comments on commit 70058f3

Please sign in to comment.