Creates a scratch container, with no image or metadata. To pull an image, follow up with the "from" function.
(opts ...ContainerOpts)
| 12349 | // |
| 12350 | // To pull an image, follow up with the "from" function. |
| 12351 | func (r *Query) Container(opts ...ContainerOpts) *Container { |
| 12352 | q := r.query.Select("container") |
| 12353 | for i := len(opts) - 1; i >= 0; i-- { |
| 12354 | // `platform` optional argument |
| 12355 | if !querybuilder.IsZeroValue(opts[i].Platform) { |
| 12356 | q = q.Arg("platform", opts[i].Platform) |
| 12357 | } |
| 12358 | } |
| 12359 | |
| 12360 | return &Container{ |
| 12361 | query: q, |
| 12362 | } |
| 12363 | } |
| 12364 | |
| 12365 | // Returns the current environment |
| 12366 | // |