Skip to content

Commit

Permalink
chore: source dir
Browse files Browse the repository at this point in the history
Signed-off-by: Vasek - Tom C <[email protected]>
  • Loading branch information
TomChv committed Jan 20, 2025
1 parent f2b1d25 commit aa92907
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker_sdk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ func (m *Dockersdk) ModuleRuntime(ctx context.Context, modSource *dagger.ModuleS
return nil, fmt.Errorf("failed to get module path: %w", err)
}

sourceDir := modSource.ContextDirectory().Directory(modulePath)
if sourceDir == nil {
sourceDir = dag.Directory()
}

return dag.
Container().
From("golang:1.23.2-alpine").
WithWorkdir("/runtime").
WithFile("/runtime/magic_sdk", runtimeBin).
WithDirectory("/app", modSource.ContextDirectory().Directory(modulePath)).
WithDirectory("/app", sourceDir).
WithEntrypoint([]string{"/runtime/magic_sdk"}), nil
}

Expand Down

0 comments on commit aa92907

Please sign in to comment.