Show Docker Compose definition info for service_name. SERVICE_NAME is the name of the docker service defined in compose.yaml. Look at `archery docker images` output for names.
(obj, service_name, show)
| 288 | " command, environment, build, dockerfile") |
| 289 | @click.pass_obj |
| 290 | def docker_compose_info(obj, service_name, show): |
| 291 | """Show Docker Compose definition info for service_name. |
| 292 | |
| 293 | SERVICE_NAME is the name of the docker service defined in |
| 294 | compose.yaml. Look at `archery docker images` output for names. |
| 295 | """ |
| 296 | compose = obj['compose'] |
| 297 | try: |
| 298 | service = compose.config.raw_config["services"][service_name] |
| 299 | except KeyError: |
| 300 | click.echo(f'Service name {service_name} could not be found', err=True) |
| 301 | sys.exit(1) |
| 302 | else: |
| 303 | click.echo(f'Service {service_name} Docker Compose config:') |
| 304 | output = "\n".join(compose.info(service, show)) |
| 305 | click.echo(output) |