Change the container's working directory. Like WORKDIR in Dockerfile.
(path string, opts ...ContainerWithWorkdirOpts)
| 3586 | |
| 3587 | // Change the container's working directory. Like WORKDIR in Dockerfile. |
| 3588 | func (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. |
| 3604 | func (r *Container) WithoutAnnotation(name string) *Container { |
no test coverage detected