{"id":16866764,"url":"https://github.com/snth/docker-raft","last_synced_at":"2026-05-19T03:15:01.701Z","repository":{"id":186087974,"uuid":"674552917","full_name":"snth/docker-raft","owner":"snth","description":"Emulate docker-compose CLI for Docker Swarm","archived":false,"fork":false,"pushed_at":"2023-08-09T15:13:03.000Z","size":38,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T21:14:49.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/snth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-04T08:14:02.000Z","updated_at":"2024-07-10T15:33:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7e7bc8c-c5b3-42fd-90d1-26633cbefa20","html_url":"https://github.com/snth/docker-raft","commit_stats":null,"previous_names":["snth/docker-stack","snth/docker-raft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snth%2Fdocker-raft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snth%2Fdocker-raft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snth%2Fdocker-raft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snth%2Fdocker-raft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snth","download_url":"https://codeload.github.com/snth/docker-raft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244272995,"owners_count":20426837,"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":[],"created_at":"2024-10-13T14:51:38.815Z","updated_at":"2026-05-19T03:14:56.666Z","avatar_url":"https://github.com/snth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker raft\n\nEmulate docker-compose CLI for Docker Swarm\n\nSimply replace `docker compose up -d \u003cservice\u003e` with `docker raft \u003cservice\u003e`\nin your deployment scripts. This command will deploy the service to run on your\ndocker swarm.\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n\t- [exec](#exec)\n\t- [logs](#logs)\n- [FAQ](#faq)\n- [License](#license)\n\n## Features\n\n- ✨ Easily `exec` into containers running on remote nodes.\n- 📜 Easily tail logs of services running on remote nodes.\n- 🐳 Deploy with the same environment variable substitutions as Docker Compose.\n\n## Prerequisites\n\nYou need to have an existing Docker Swarm set up and running. See the\n[official documentation](https://docs.docker.com/engine/swarm/) for details.\n\n## Installation\n\n```bash\n# Ensure directory for Docker cli plugins exists\nmkdir -p ~/.docker/cli-plugins\n\n# Download docker-rollout script to Docker cli plugins directory\ncurl https://raw.githubusercontent.com/snth/docker-stack/main/docker-raft -o ~/.docker/cli-plugins/docker-raft\n\n# Make the script executable\nchmod +x ~/.docker/cli-plugins/docker-raft\n```\n\nAlternatively, you can use the provided install script for an interactively\nguided install:\n\n    bash \u003c(curl -sS https://raw.githubusercontent.com/snth/docker-stack/main/install)\n\n## Usage\n\nRun `docker raft -p \u003cNAME\u003e COMMAND` instead of \n`docker compose -p \u003cNAME\u003e COMMAND`.\n\nHopefully the rest is self-explanatory from there.\n\n\t$ docker raft -h\n\n\tUsage: docker raft [OPTIONS] COMMAND [ARG...]\n\n\tEmulate the docker-compose CLI for Docker Swarm\n\n\tOPTIONS:\n\t-e, --env list              Set environment variables\n\t-h, --help                  Display command usage help\n\t-H, --host string           Override the service host\n\t-P, --port number           Port to connect to host on (default:2375)\n\t-p, --project-name string   Project(Stack) name\n\t-v, --verbose               Print verbose output\n\n\tCOMMANDS:\n\texec        Execute a command in a running container.\n\tlogs        Fetch the logs of a container\n\tls          List stacks.\n\tps          List the tasks in the stack.\n\tservices    List the services in the stack.\n\n### exec\n\n\t$ docker raft exec -h\n\n\tUsage: docker raft [OPTIONS] exec [EXEC_OPTIONS] SERVICE [EXEC_ARGS...]\n\n\tExecute a command in a running service\n\n\tOPTIONS:\n\t-h, --help                  Display command usage help\n\t-H, --host string           Override the service host\n\t-P, --port number           Port to connect to host on (default:2375)\n\t-p, --project-name string   Project(Stack) name\n\t-v, --verbose               Print verbose output\n\n\tEXEC_OPTIONS\n\t-h, --help              Display command usage help\n\t-i, --interactive       Keep STDIN open even if not attached\n\t-t, --tty               Allocate a pseudo-TTY\n\t-u, --user string       Username or UID (format: \"\u003cname|uid\u003e[:\u003cgroup|gid\u003e]\")\n\t-w, --workdir string    Working directory inside the container\n\n\n### logs\n\n\t$ docker raft logs -h\n\n\tUsage: docker raft [OPTIONS] logs [LOGS_OPTIONS] SERVICE [LOGS_ARGS...]\n\n\tFetch the logs of a container\n\n\tOPTIONS:\n\t-h, --help                  Display command usage help\n\t-H, --host string           Override the service host\n\t-P, --port number           Port to connect to host on (default:2375)\n\t-p, --project-name string   Project(Stack) name\n\t-v, --verbose               Print verbose output\n\n\tLOGS_OPTIONS\n\t-h, --help              Display command usage help\n\t\t--details           Show extra details provided to logs\n\t-f, --follow            Follow log output\n\t-n, --tail string       Number of lines to show from the end of the logs (default \"all\")\n\t-t, --timestamps        Show timestamps\n\n## FAQ\n\n### Why the name docker-raft?\n\nInitially I called it docker-stack but then I learned of the Docker cli-plugins\nfunctionality and this created a name collision.\n\nI considered a number of options like *skiff* (a type of Duck Boat), *flock*\n(possible confusion with the flocker plugin), *ship* (implies more stability\nthan this deserves), ...\n\nIn the end I settled on *raft* because:\n\n  - A raft is a janky, floating vessel which you probably wouldn't want to rely\n\ton for production use.\n  - Docker Swarm uses the Raft consensus algorithm under the hood.\n  - A [floating group of\n\tducks](https://misfitanimals.com/ducks/what-is-a-group-of-ducks-called/#:~:text=Interesting%20Duck%20Facts-,A%20Raft%20of%20Ducks,-A%20raft%20of)\n\tis sometimes called a raft.\n\n## License\n\n[Apache 2.0 License](LICENSE) \u0026copy; Tobias Brandt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnth%2Fdocker-raft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnth%2Fdocker-raft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnth%2Fdocker-raft/lists"}