{"id":15576615,"url":"https://github.com/abn/docker-consul","last_synced_at":"2026-04-01T20:29:23.401Z","repository":{"id":36264548,"uuid":"40568990","full_name":"abn/docker-consul","owner":"abn","description":"Consul containerized in a scratch container","archived":false,"fork":false,"pushed_at":"2016-08-28T11:39:39.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T21:59:24.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abn.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":"2015-08-11T22:49:59.000Z","updated_at":"2021-05-11T02:02:47.000Z","dependencies_parsed_at":"2022-09-04T12:20:22.735Z","dependency_job_id":null,"html_url":"https://github.com/abn/docker-consul","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/abn/docker-consul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abn","download_url":"https://codeload.github.com/abn/docker-consul/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-consul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-02T18:53:07.693Z","updated_at":"2026-04-01T20:29:23.374Z","avatar_url":"https://github.com/abn.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consul Container\n\nThis project puts [Consul](https://github.com/hashicorp/consul) in scratch docker container. It is available on [Docker Hub](https://registry.hub.docker.com/u/alectolytic/consul/) and can be pulled using the following command.\n\n```sh\ndocker pull alectolytic/consul\n```\n\nYou will note that this is a tiny image.\n```\n$ docker images | grep docker.io/alectolytic/consul\ndocker.io/alectolytic/consul    latest    abf9a1e6fbd2    3 minutes ago    15.33 MB\n```\n\n## Quickstart\n\n#### Default\n\nBy default, a single consul agent is run in server mode.\n\n```sh\ndocker run --rm -it alectolytic/consul\n```\n\nThis is equivalent to executing the following.\n\n```sh\nconsul agent -server -bootstrap \\\n  -config-dir=/etc/consul -data-dir=/var/lib/consul \\\n  -client=0.0.0.0 -ui-dir=/usr/share/consul-ui\n```\n\nThe output looks similar to this.\n\n```\n==\u003e WARNING: Bootstrap mode enabled! Do not enable unless necessary\n==\u003e WARNING: It is highly recommended to set GOMAXPROCS higher than 1\n==\u003e Starting raft data migration...\n==\u003e Starting Consul agent...\n==\u003e Starting Consul agent RPC...\n==\u003e Consul agent running!\n        Node name: '52b7a6700f2c'\n       Datacenter: 'dc1'\n           Server: true (bootstrap: true)\n      Client Addr: 0.0.0.0 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)\n     Cluster Addr: 172.17.0.63 (LAN: 8301, WAN: 8302)\n   Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false\n            Atlas: \u003cdisabled\u003e\n\n==\u003e Log data will now stream in as it occurs:\n\n   2015/08/11 22:11:06 [INFO] serf: EventMemberJoin: 52b7a6700f2c 172.17.0.63\n   2015/08/11 22:11:06 [INFO] serf: EventMemberJoin: 52b7a6700f2c.dc1 172.17.0.63\n   2015/08/11 22:11:06 [INFO] raft: Node at 172.17.0.63:8300 [Follower] entering Follower state\n   2015/08/11 22:11:06 [INFO] consul: adding server 52b7a6700f2c (Addr: 172.17.0.63:8300) (DC: dc1)\n   2015/08/11 22:11:06 [INFO] consul: adding server 52b7a6700f2c.dc1 (Addr: 172.17.0.63:8300) (DC: dc1)\n   2015/08/11 22:11:06 [ERR] agent: failed to sync remote state: No cluster leader\n   2015/08/11 22:11:08 [WARN] raft: Heartbeat timeout reached, starting election\n   2015/08/11 22:11:08 [INFO] raft: Node at 172.17.0.63:8300 [Candidate] entering Candidate state\n   2015/08/11 22:11:08 [INFO] raft: Election won. Tally: 1\n   2015/08/11 22:11:08 [INFO] raft: Node at 172.17.0.63:8300 [Leader] entering Leader state\n   2015/08/11 22:11:08 [INFO] consul: cluster leadership acquired\n   2015/08/11 22:11:08 [INFO] consul: New leader elected: 52b7a6700f2c\n   2015/08/11 22:11:08 [INFO] raft: Disabling EnableSingleNode (bootstrap)\n   2015/08/11 22:11:08 [INFO] consul: member '52b7a6700f2c' joined, marking health alive\n   2015/08/11 22:11:10 [INFO] agent: Synced service 'consul'\n\n```\n\n#### Persisted data volume\n\n```sh\n# create data container\ndocker create  --entrypoint=_ -v /var/lib/consul --name consul-data scratch\n\n# run consul\ndocker run --rm -it --volumes-from alectolytic/consul\n```\n\n#### Custom commands\n\n```sh\ndocker run --rm -it alectolytic/consul agent -server -bootstrap -data-dir /var/lib/consul\n```\n\n#### Configuration file\n\n```sh\ndocker run --rm -it -v /path/to/config.json:/etc/consul/config.json alectolytic/consul agent -config-file=/etc/consul/config.json\n```\n\n**NOTE:** If running on an SELinux enabled system, run `chcon -Rt svirt_sandbox_file_t /path/to/config.json` before staring consul.\n\n\n## Exposed ports\n\n```\nEXPOSE \\\n    53/tcp 53/udp \\\n    8300/tcp \\\n    8301/tcp 8301/udp \\\n    8302/tcp 8302/udp \\\n    8400/tcp \\\n    8500/tcp \\\n    8600/tcp 8600/udp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fdocker-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabn%2Fdocker-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fdocker-consul/lists"}