Skip to content

Feature Request: Add command to print config #2365

@hamiltont

Description

@hamiltont

docker-compose has the config command to print the full configuration

This is invaluable for many scenarios:

  • checking passed build args
  • confirming that multiple YAML files have combined properly
  • ensuring that your CI/CD variables are making it into the YAML properly (e.g. GitLab CI/CD env variables don't properly support $, so variables like $apr1$hash get mangled before they enter the YAML file)
  • recording a record of each deployment

Could swarm have a config command as well?

My team has basically 100% migrated to swarm, but we keep docker-compose installed in our CI/CD environment specifically for this one subcommand

Example docker-compose config output

docker-compose config
 networks:
   internal: {}
   web-ingress: {}
 services:
   dashboard:
     build:
       args:
         BUILD_FLAGS: VUE_APP_API_URL=https://api.dev.mydomain.com VUE_APP_COOKIE_DOMAIN=dev.mydomain.com
       context: /builds/mygroup/my-project
     image: 543066533799.dkr.ecr.us-east-1.amazonaws.com/mycontainer:64e3da5d
     networks:
       internal: {}
       web-ingress: {}
     ports:
     - published: 80
       target: 80
 version: '3.7'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions