Execute docker compose pull.
(obj, image, *, pull_leaf, ignore_pull_failures)
| 113 | help="Whether to ignore pull failures.") |
| 114 | @click.pass_obj |
| 115 | def docker_pull(obj, image, *, pull_leaf, ignore_pull_failures): |
| 116 | """ |
| 117 | Execute docker compose pull. |
| 118 | """ |
| 119 | compose = obj['compose'] |
| 120 | |
| 121 | try: |
| 122 | compose.pull(image, pull_leaf=pull_leaf, |
| 123 | ignore_pull_failures=ignore_pull_failures) |
| 124 | except UndefinedImage as e: |
| 125 | raise click.ClickException( |
| 126 | "There is no service/image defined in compose.yaml with " |
| 127 | f"name: {e}" |
| 128 | ) |
| 129 | except RuntimeError as e: |
| 130 | raise click.ClickException(str(e)) |
| 131 | |
| 132 | |
| 133 | @docker.command('build') |
no test coverage detected