MCPcopy Index your code
hub / github.com/dagger/dagger / WithWorkdir

Method WithWorkdir

sdk/python/runtime/internal/dagger/dagger.gen.go:3588–3601  ·  view source on GitHub ↗

Change the container's working directory. Like WORKDIR in Dockerfile.

(path string, opts ...ContainerWithWorkdirOpts)

Source from the content-addressed store, hash-verified

3586
3587// Change the container's working directory. Like WORKDIR in Dockerfile.
3588func (r *Container) WithWorkdir(path string, opts ...ContainerWithWorkdirOpts) *Container {
3589 q := r.query.Select("withWorkdir")
3590 for i := len(opts) - 1; i >= 0; i-- {
3591 // `expand` optional argument
3592 if !querybuilder.IsZeroValue(opts[i].Expand) {
3593 q = q.Arg("expand", opts[i].Expand)
3594 }
3595 }
3596 q = q.Arg("path", path)
3597
3598 return &Container{
3599 query: q,
3600 }
3601}
3602
3603// Retrieves this container minus the given OCI annotation.
3604func (r *Container) WithoutAnnotation(name string) *Container {

Callers 2

WithSDKMethod · 0.45
WithSourceMethod · 0.45

Calls 2

SelectMethod · 0.65
ArgMethod · 0.45

Tested by

no test coverage detected