{"id":13840169,"url":"https://github.com/getporter/docker-mixin","last_synced_at":"2025-12-13T01:19:04.440Z","repository":{"id":43374066,"uuid":"278149587","full_name":"getporter/docker-mixin","owner":"getporter","description":"A docker mixin for porter","archived":false,"fork":false,"pushed_at":"2024-08-23T16:38:33.000Z","size":6613,"stargazers_count":7,"open_issues_count":9,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-21T09:36:10.476Z","etag":null,"topics":["docker","mixin","porter"],"latest_commit_sha":null,"homepage":"https://getporter.org/mixins/docker","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":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-08T17:12:18.000Z","updated_at":"2024-08-30T20:23:11.000Z","dependencies_parsed_at":"2024-01-20T21:48:50.948Z","dependency_job_id":"13b3adfe-75e4-4aa5-9dd6-cbc44887e919","html_url":"https://github.com/getporter/docker-mixin","commit_stats":{"total_commits":35,"total_committers":8,"mean_commits":4.375,"dds":0.6,"last_synced_commit":"8e69cdfca64c7a4ab5a212d12a62aadb57f163c1"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":"getporter/skeletor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-mixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-mixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-mixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getporter%2Fdocker-mixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getporter","download_url":"https://codeload.github.com/getporter/docker-mixin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227855212,"owners_count":17830157,"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","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","mixin","porter"],"created_at":"2024-08-04T17:00:43.068Z","updated_at":"2025-12-13T01:18:59.380Z","avatar_url":"https://github.com/getporter.png","language":"Go","funding_links":[],"categories":["Implementations"],"sub_categories":["Porter"],"readme":"# A Docker Mixin for Porter\n\nThis is a Docker mixin for Porter. The mixin provides the Docker CLI.\n\n[![Build Status](https://dev.azure.com/getporter/porter/_apis/build/status/docker-mixin?branchName=main)](https://dev.azure.com/getporter/porter/_build/latest?definitionId=12\u0026branchName=main)\n\n\u003cimg src=\"https://porter.sh/images/mixins/docker.png\" align=\"right\" width=\"150px\"/\u003e\n\n## Mixin Declaration\n\nTo use this mixin in a bundle, declare it like so:\n\n```yaml\nmixins:\n- docker\n```\n\n## Mixin Configuration\n\nThe Docker client version can be specified via the `clientVersion` configuration when declaring this mixin. The default client version is currently set to 20.10.7.\n```yaml\n- docker:\n    clientVersion: 20.10.7\n```\n## Mixin Commands\nThe commands available are docker pull, push, build, run, remove, and login.\n\n## Mixin Syntax \u0026 Examples\nThe same syntax applies for install, upgrade, and uninstall.\n\n### Docker pull\n\n#### Syntax\nYou can specify either the tag or the digest.\n```yaml\n- docker:\n    description: \"Description of the command\"\n    pull:\n      name: IMAGE_NAME\n      tag: IMAGE_TAG\n      digest: IMAGE_DIGEST\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n```\n\n#### Example\n````yaml\n- docker:\n    description: \"Install Whalesay\"\n    pull:\n      name: docker/whalesay\n      tag: latest\n````\n\n### Docker push\n\n#### Syntax\n```yaml\n- docker:\n    description: \"Description of the command\"\n    push:\n      name: IMAGE_NAME\n      tag: IMAGE_TAG\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n```\n\n#### Example\n````yaml\n- docker:\n    description: \"Push image\"\n    push:\n      name: gmadhok/cookies\n      tag: v1.0\n````\n\n### Docker build\n\n#### Syntax\n```yaml\n- docker:\n    description: \"Description of the command\"\n    build:\n      tag: IMAGE_TAG\n      file: Dockerfile #OPTIONAL\n      path: PATH #defaults to \".\" OPTIONAL\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n```\n\n#### Example\n````yaml\n- docker:\n    description: \"Build image\"\n    build:\n      tag: \"gmadhok/cookies:v1.0\"\n      file: Dockerfile\n````\n\n### Docker run\n\n#### Syntax\n```yaml\n- docker:\n    description: \"Description of the command\"\n    run:\n      image: IMAGE\n      name: NAME\n      detach: BOOL #defaults to false\n      ports:\n        - host: NUMBER # porter exposed on the host\n          container: NUMBER # port exposed by the container\n      env:\n        variable: VALUE\n      privileged: BOOL #defaults to false\n      rm: BOOL #defaults to false\n      command: COMMAND\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n      suppress-output: BOOL #defaults to false\n```\n\n#### Example\n```yaml\n - docker:\n    description: \"Run Whalesay\"\n    run:\n      name: mixinpractice\n      image: \"docker/whalesay:latest\"\n      detach: true\n      ports:\n        - host: 8080\n          container: 80\n      env:\n        myvar: \"whales\"\n      privileged: true\n      rm: true\n      command: cowsay\n      arguments:\n         - \"Hello World\"\n```\n\n### Docker remove\n\n#### Syntax\n```yaml\n- docker:\n    description: \"Description of the command\"\n    remove:\n      container: CONTAINER_NAME\n      force: BOOL #defaults to false\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n```\n\n#### Example\n```yaml\n- docker:\n    description: \"Remove mixinpractice\"\n    remove:\n      container: mixinpractice\n      force: true\n```\n\n### Docker login\n\n#### Syntax\nUsername and password are optional because the mixin will default to using environment variables provided by DOCKER_USERNAME and DOCKER_PASSWORD from a parameter or a credential.\nSee an [example](/examples/docker-mixin-test/README.md#notes-on-docker-login) for how to use docker login and securely provide your username and password.\n```yaml\n- docker:\n    description: \"Description of the command\"\n    login:\n      username: USERNAME #OPTIONAL\n      password: PASSWORD #OPTIONAL\n      arguments:\n      - arg1\n      - arg2\n      flags:\n        FLAGNAME: FLAGVALUE\n        REPEATED_FLAG:\n        - FLAGVALUE1\n        - FLAGVALUE2\n```\n\n#### Example\n```yaml\n- docker:\n    description: \"Login to docker\"\n    login:\n```\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```shell\n$ porter install --allow-docker-host-access\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetporter%2Fdocker-mixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetporter%2Fdocker-mixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetporter%2Fdocker-mixin/lists"}