{"id":15065974,"url":"https://github.com/amitizle/ex_docker_compose","last_synced_at":"2026-02-26T03:48:34.300Z","repository":{"id":62429083,"uuid":"118354552","full_name":"amitizle/ex_docker_compose","owner":"amitizle","description":"Elixir library that wraps Docker compose","archived":false,"fork":false,"pushed_at":"2018-01-21T18:44:18.000Z","size":120,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-16T17:08:44.944Z","etag":null,"topics":["docker","docker-compose","elixir","elixir-lang","elixir-library"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitizle.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":null,"security":null,"support":null}},"created_at":"2018-01-21T16:57:02.000Z","updated_at":"2024-08-06T05:58:30.000Z","dependencies_parsed_at":"2022-11-01T20:01:27.536Z","dependency_job_id":null,"html_url":"https://github.com/amitizle/ex_docker_compose","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amitizle/ex_docker_compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Fex_docker_compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Fex_docker_compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Fex_docker_compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Fex_docker_compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitizle","download_url":"https://codeload.github.com/amitizle/ex_docker_compose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitizle%2Fex_docker_compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29848654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"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","elixir","elixir-lang","elixir-library"],"created_at":"2024-09-25T00:58:36.433Z","updated_at":"2026-02-26T03:48:34.263Z","avatar_url":"https://github.com/amitizle.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/amitizle/ex_docker_compose.svg?branch=master)](https://travis-ci.org/amitizle/ex_docker_compose) [![Inline docs](http://inch-ci.org/github/amitizle/ex_docker_compose.svg)](http://inch-ci.org/github/amitizle/ex_docker_compose)\n\n# ExDockerCompose\n\n`ExDockerCompose` is a simple library to for interacting with [`docker-compose`](https://docs.docker.com/compose/).\nIt's a wrapper for the `docker-compose` binary and running the actuall commands by using [Porcelain](https://github.com/alco/porcelain).\n\nIt works by spawning a `GenServer` that's using `Porcelain.spawn_shell/2` and handles the messages coming from the\nprocess.\n\n## Usage\n\nTL;DR: `ExDockerCompose.\u003csubcommand\u003e(\u003ccompose_opts\u003e, \u003csubcommand_opts\u003e)`, where:\n\n  * `subcommand` is one of the available `docker-compose` subcommands.\n  * `compose_opts` is a `List` of parameters to the `docker-compose` binary (not for the subcommand), type `docker-comose --help` to see those.\n  * `subcommand_opts` is a `List` of parameters to the specific subcommand, for example; `docker-compose up -t 10`\n\nSince the library simply takes those and translates the command, subcommand and the opts to a `docker-compose` binary execution,\nusage is similar to the regular usage of `docker-compose`.\n\n### Example\n\nConsider the following `docker-compose` definition and assume that the yaml file is\nlocated at `/tmp/docker-compose.yml`. The content of the file is:\n\n```yaml\nversion: '3'\nservices:\n  redis:\n    image: \"redis:alpine\"\n```\n\n```elixir\n$ iex -S mix\n\niex(1)\u003e ExDockerCompose.up([{:f, \"/tmp/docker-compose.yml\"}], [])\n:ok\niex(2)\u003e Creating network \"tmp_default\" with the default driver\nCreating tmp_redis_1 ... done\n\nAttaching to tmp_redis_1\nredis_1  | 1:C 21 Jan 17:16:28.737 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo\nredis_1  | 1:C 21 Jan 17:16:28.737 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=1, just started\nredis_1  | 1:C 21 Jan 17:16:28.737 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf\nredis_1  | 1:M 21 Jan 17:16:28.739 * Running mode=standalone, port=6379.\nredis_1  | 1:M 21 Jan 17:16:28.739 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.\nredis_1  | 1:M 21 Jan 17:16:28.739 # Server initialized\nredis_1  | 1:M 21 Jan 17:16:28.739 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never \u003e /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.\nredis_1  | 1:M 21 Jan 17:16:28.739 * Ready to accept connections\n\nnil\niex(3)\u003e ExDockerCompose.stop([{:f, \"/tmp/docker-compose.yml\"}], [])\n:ok\niex(4)\u003e Stopping tmp_redis_1 ...\nredis_1  | 1:signal-handler (1516554998) Received SIGTERM scheduling shutdown...\nredis_1  | 1:M 21 Jan 17:16:38.442 # User requested shutdown...\nredis_1  | 1:M 21 Jan 17:16:38.442 * Saving the final RDB snapshot before exiting.\nredis_1  | 1:M 21 Jan 17:16:38.449 * DB saved on disk\nStopping tmp_redis_1 ... done\n\ntmp_redis_1 exited with code 0\n\npid #PID\u003c0.168.0\u003e exited with exit code 0 (command /usr/local/bin/docker-compose -f /tmp/docker-compose.yml stop)\npid #PID\u003c0.163.0\u003e exited with exit code 0 (command /usr/local/bin/docker-compose -f /tmp/docker-compose.yml up)\n\nnil\n```\n\n## Testing locally\n\n```bash\n$ mix do deps.get, deps.compile\n$ mix test\n```\n\nTests are incomplete at the moment.\n\n## Configuration\n\n`docker-compose` executable path is configurable by either using [Application](https://hexdocs.pm/elixir/Application.html#get_env/3)\nconfig, or by using an environment varibale.\nNote that the `Application` config has the precedence.\n\n```elixir\nconfig :ex_docker_compose, :bin_file, \"/path/to/docker-compose\"\n```\n\nAs an environment variable, `ExDockerCompose` will look for `DOCKER_COMPOSE_BIN`.\nIf non of them are found, `ExDockerCompose` will get the `docker-compose` executable by using\n[`System.find_executable(\"docker-compose\")`](https://hexdocs.pm/elixir/System.html#find_executable/1)\n\n### Config Porcelain\n\n`Porcelain` can be configured to use the [goon driver](https://github.com/alco/porcelain#configuring-the-goon-driver).\n`ExDockerCompose` configured to use `:goon_warn_if_missing = true` to deprecate the warnings, however, one can configure\n`Porcelain` to use the `goon` driver locally by adding the same configuration that's described on `Porcelain` docs:\n\n```elixir\nconfig :porcelain, :goon_driver_path, \u003cpath\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitizle%2Fex_docker_compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitizle%2Fex_docker_compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitizle%2Fex_docker_compose/lists"}