{"id":13840175,"url":"https://github.com/getporter/docker-compose-mixin","last_synced_at":"2025-12-13T01:28:53.476Z","repository":{"id":37490294,"uuid":"252553758","full_name":"getporter/docker-compose-mixin","owner":"getporter","description":"Porter mixin for the docker-compose CLI","archived":false,"fork":false,"pushed_at":"2025-09-07T18:56:21.000Z","size":356,"stargazers_count":8,"open_issues_count":3,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-09-07T20:41:23.120Z","etag":null,"topics":["docker","docker-compose","mixin","porter"],"latest_commit_sha":null,"homepage":"https://getporter.org/mixins/docker-compose","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getporter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-02T19:59:53.000Z","updated_at":"2025-09-07T18:52:47.000Z","dependencies_parsed_at":"2024-01-20T21:48:56.114Z","dependency_job_id":"946d73d5-d424-4c3b-a850-b5f3275e2a18","html_url":"https://github.com/getporter/docker-compose-mixin","commit_stats":{"total_commits":46,"total_committers":9,"mean_commits":5.111111111111111,"dds":0.6304347826086957,"last_synced_commit":"2a13308642439f4c0f28ebb0f762492e8b00570a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/getporter/docker-compose-mixin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-compose-mixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-compose-mixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-compose-mixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-compose-mixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getporter","download_url":"https://codeload.github.com/getporter/docker-compose-mixin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-compose-mixin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27697717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","mixin","porter"],"created_at":"2024-08-04T17:00:43.175Z","updated_at":"2025-12-13T01:28:53.429Z","avatar_url":"https://github.com/getporter.png","language":"Go","funding_links":[],"categories":["Implementations"],"sub_categories":["Porter"],"readme":"# Docker Compose Mixin for Porter\n\nThis is a mixin for Porter that provides the Docker Compose (docker-compose) CLI.\n\n[![porter/docker-compose-mixin](https://github.com/getporter/docker-compose-mixin/actions/workflows/docker-compose-mixin.yml/badge.svg?branch=main)](https://github.com/getporter/docker-compose-mixin/actions/workflows/docker-compose-mixin.yml)\n\n\u003cimg src=\"https://porter.sh/images/mixins/docker-compose.png\" align=\"right\" width=\"150px\"/\u003e\n\n## Install via Porter\n\nThis will install the latest mixin release via the Porter CLI.\n\n```\nporter mixin install docker-compose\n```\n\n## Mixin Declaration\n\nTo use this mixin in a bundle, declare it like so:\n\n```yaml\nmixins:\n- docker-compose\n```\n\nTo override the default docker-compose version, you can declare the mixin such as:\n\n```yaml\nmixins:\n- docker-compose:\n    clientVersion: 1.26.0\n```\n\n## Docker mixin\n\nThis `docker-compose` mixin only adds the [docker-compose] CLI. However, the\n[docker] CLI will also most likely be required by bundles using Docker Compose.\n\nTo add `docker`, you'll need to add the [Docker mixin] under the `mixins`\nsection as well.\n\n```yaml\nmixins:\n- docker\n```\n\nFor further details and configuration options for the Docker mixin, see the\nrepo's [README][Docker mixin README].\n\n[docker-compose]: https://docs.docker.com/compose/reference/\n[docker]: https://docs.docker.com/engine/reference/commandline/cli/\n[Docker mixin]: https://github.com/getporter/docker-mixin\n[Docker mixin README]: https://github.com/getporter/docker-mixin#readme\n\n## Required Extension\n\nTo declare that Docker access is required to run the bundle, as will probably\nalways be the case when using this mixin, we can add `docker` (the extension name)\nunder the `required` section in the manifest, like so:\n\n```yaml\nrequired:\n  - docker\n```\n\nAdditional configuration for this extension is currently limited to whether or\nnot the container should run as privileged or not:\n\n```yaml\nrequired:\n  - docker:\n      privileged: false\n```\n\nDeclaring this extension as required is a great way to let potential users of\nyour bundle know that Docker access is necessary to install.\n\nSee more information via the [Porter documentation](https://porter.sh/author-bundles/#docker).\n\n## Mixin Syntax\n\nSee the [docker-compose CLI Command Reference](https://docs.docker.com/compose/reference/) for the supported commands.\n\n```yaml\ndocker-compose:\n  description: \"Description of the command\"\n  arguments:\n  - arg1\n  - arg2\n  flags:\n    FLAGNAME: FLAGVALUE\n    REPEATED_FLAG:\n    - FLAGVALUE1\n    - FLAGVALUE2\n  suppress-output: false\n  outputs:\n    - name: NAME\n      jsonPath: JSONPATH\n    - name: NAME\n      path: SOURCE_FILEPATH\n```\n\n### Suppress Output\n\nThe `suppress-output` field controls whether output from the mixin should be\nprevented from printing to the console. By default this value is false, using\nPorter's default behavior of hiding known sensitive values. When \n`suppress-output: true` all output from the mixin (stderr and stdout) are hidden.\n\nStep outputs (below) are still collected when output is suppressed. This allows\nyou to prevent sensitive data from being exposed while still collecting it from\na command and using it in your bundle.\n\n### Outputs\n\nThe mixin supports `jsonpath` and `path` outputs.\n\n\n#### JSON Path\n\nThe `jsonPath` output treats stdout like a json document and applies the expression, saving the result to the output.\n\n```yaml\noutputs:\n- name: NAME\n  jsonPath: JSONPATH\n```\n\nFor example, if the `jsonPath` expression was `$[*].id` and the command sent the following to stdout:\n\n```json\n[\n  {\n    \"id\": \"1085517466897181794\",\n    \"name\": \"my-vm\"\n  }\n]\n```\n\nThen the output would have the following contents:\n\n```json\n[\"1085517466897181794\"]\n```\n\n#### File Paths\n\nThe `path` output saves the content of the specified file path to an output.\n\n```yaml\noutputs:\n- name: kubeconfig\n  path: /root/.kube/config\n```\n\n### Example\n\n```yaml\ndocker-compose:\n  description: \"Docker Compose Up\"\n  arguments:\n    - up\n    - -d\n  flags:\n    timeout: 30\n```\n\n## Mixin Commands\n\nThis mixin has built-in support for common Docker Compose commands. Supported\ncommands can be defined within the `docker-compose` step and support the same\nfields and options.\n\nArguments and flags can be set on both the `docker-compose` step and on the\nspecified sub-command. Arguments and flags set on the `docker-compose` step\nwill be applied to the `docker-compose` part of the command while arguments\nand flags set on the sub-command will be applied to the sub-command.\n\nYou may only specify one command within a single `docker-compose` step. To\nexecute multiple commands, define multiple `docker-compose` steps.\n\n### Docker Compose Pull\n\n```yaml\ndocker-compose:\n  description: Docker Compose Pull\n  flags:\n    file: compose.yml\n  pull:\n    arguments:\n      - serviceA\n      - serviceB\n    flags:\n      ignore-pull-failures:\n      policy: missing\n```\n\nThis is equivalent to: `docker-compose --file compose.yml pull --ignore-pull-failures --policy missing serviceA serviceB`\n\n### Docker Compose Up\n\n```yaml\ndocker-compose:\n  description: Docker Compose Up\n  up:\n    arguments:\n      - serviceA\n      - serviceB\n    flags:\n      detach:\n      timeout: 30\n```\n\nThis is equivalent to: `docker-compose up --detach --timeout 30 serviceA serviceB`\n\n### Docker Compose Down\n\n```yaml\ndocker-compose:\n  description: Docker Compose Down\n  down:\n    flags:\n      remove-orphans:\n      timeout: 30\n```\n\nThis is equivalent to: `docker-compose down --remove-orphans --timeout 30`\n\nSee full bundle examples in the `examples` directory.\n\n## Invocation\n\nUse of this mixin requires opting-in to Docker host access via a Porter setting.  See the Porter [documentation](https://porter.sh/configuration/#allow-docker-host-access) for further details.\n\nHere we opt-in via the CLI flag, `--allow-docker-host-access`:\n\n```shell\n$ porter install --allow-docker-host-access\nBuilding bundle ===\u003e\nCopying porter runtime ===\u003e\nCopying mixins ===\u003e\nCopying mixin docker-compose ===\u003e\n\nGenerating Dockerfile =======\u003e\n\nWriting Dockerfile =======\u003e\n\nStarting Invocation Image Build =======\u003e\ninstalling docker-compose...\nexecuting install action from docker-compose (bundle instance: docker-compose)\nDocker docker-compose up\napp_web_1 is up-to-date\napp_redis_1 is up-to-date\nexecution completed successfully!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetporter%2Fdocker-compose-mixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetporter%2Fdocker-compose-mixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetporter%2Fdocker-compose-mixin/lists"}