(val string)
| 380 | } |
| 381 | |
| 382 | func validatePullOpt(val string) error { |
| 383 | switch val { |
| 384 | case PullImageAlways, PullImageMissing, PullImageNever, "": |
| 385 | // valid option, but nothing to do yet |
| 386 | return nil |
| 387 | default: |
| 388 | return fmt.Errorf( |
| 389 | "invalid pull option: '%s': must be one of %q, %q or %q", |
| 390 | val, |
| 391 | PullImageAlways, |
| 392 | PullImageMissing, |
| 393 | PullImageNever, |
| 394 | ) |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | // copyDockerConfigIntoContainer takes the client configuration and copies it |
| 399 | // into the container. |