{"id":24373307,"url":"https://github.com/peterweissdk/keepalived","last_synced_at":"2026-05-23T06:31:17.348Z","repository":{"id":272991864,"uuid":"917380353","full_name":"peterweissdk/keepalived","owner":"peterweissdk","description":"Docker container for running Keepalived with VRRP","archived":false,"fork":false,"pushed_at":"2026-02-25T20:36:15.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T22:34:12.716Z","etag":null,"topics":["docker","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterweissdk.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-15T21:46:56.000Z","updated_at":"2026-02-25T20:36:19.000Z","dependencies_parsed_at":"2025-07-07T12:27:37.025Z","dependency_job_id":"5fa265ac-3ae1-4e2f-8f1d-03379d080e72","html_url":"https://github.com/peterweissdk/keepalived","commit_stats":null,"previous_names":["peterweissdk/keepalived"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/peterweissdk/keepalived","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterweissdk%2Fkeepalived","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterweissdk%2Fkeepalived/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterweissdk%2Fkeepalived/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterweissdk%2Fkeepalived/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterweissdk","download_url":"https://codeload.github.com/peterweissdk/keepalived/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterweissdk%2Fkeepalived/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33385119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","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":["docker","dockerfile"],"created_at":"2025-01-19T05:10:37.535Z","updated_at":"2026-05-23T06:31:17.341Z","avatar_url":"https://github.com/peterweissdk.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💾 Keepalived Docker Container\n\n[![Static Badge](https://img.shields.io/badge/Docker-Container-white?style=flat\u0026logo=docker\u0026logoColor=white\u0026logoSize=auto\u0026labelColor=black)](https://docker.com/)\n[![Static Badge](https://img.shields.io/badge/Alpine-V3.23-white?style=flat\u0026logo=alpinelinux\u0026logoColor=white\u0026logoSize=auto\u0026labelColor=black)](https://www.alpinelinux.org/)\n[![Static Badge](https://img.shields.io/badge/KeepAliveD-Latest-white?style=flat\u0026logoColor=white\u0026labelColor=black)](https://keepalived.org/)\n[![Static Badge](https://img.shields.io/badge/GPL-V3-white?style=flat\u0026logo=gnu\u0026logoColor=white\u0026logoSize=auto\u0026labelColor=black)](https://www.gnu.org/licenses/gpl-3.0.en.html/)\n\nA lightweight, Alpine-based Docker container for running Keepalived with VRRP (Virtual Router Redundancy Protocol) support.\n\n## ✨ Features\n\n- **Alpine-based**: Lightweight and secure base image\n- **VRRP support**: High availability with Virtual Router Redundancy Protocol (VRRP)\n- **Easy Configuration**: Configure Keepalived using environment variables, and service check-scripts\n- **Health Checks**: Monitor service health with built-in Docker health checks\n\n## 🚀 Quick Start\n\nRun the container:\n```bash\n# Pull the image\ndocker pull peterweissdk/keepalived\n\n# Run with custom configuration\ndocker run -d \\\n  --name keepalived \\\n  --restart=unless-stopped \\\n  --cap-add=NET_ADMIN \\\n  --cap-add=NET_BROADCAST \\\n  --cap-add=NET_RAW \\\n  --net=host \\\n  --env-file .env \\\n  keepalived:latest\n\n# Run the container using the provided Docker Compose and .env file\ndocker compose up -d\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\n| Variable         | Description                                 | Example           |\n|------------------|---------------------------------------------|-------------------|\n| `TZ`             | Container timezone                          | Europe/Copenhagen |\n| `VRRP_INSTANCE`  | VRRP instance name                          | VI_1              |\n| `INTERFACE`      | Network interface                           | eth0              |\n| `STATE`          | Node state (MASTER/BACKUP)                  | MASTER            |\n| `PRIORITY`       | Node priority (1-255)                       | 100               |\n| `ROUTER_ID`      | Unique router ID                            | 52                |\n| `VIRTUAL_IPS`    | Virtual IP address with subnet mask         | 192.168.1.100/24  |\n| `UNICAST_SRC_IP` | Source IP for unicast communication         | 192.168.1.101     |\n| `UNICAST_PEERS`  | Peer IP addresses for unicast communication | 192.168.1.102     |\n| `WEIGHT`         | Weight for tracked scripts                  | 50                |\n| `FALL`           | Number of failures before transition        | 2                 |\n| `RISE`           | Number of successes before transition       | 2                 |\n\n### Required Capabilities\n\n- NET_ADMIN: For network interface configuration\n- NET_BROADCAST: For VRRP advertisements\n- NET_RAW: For raw socket access\n\n### Service Check-Script\n\nCreate a script to run at regular intervals to check the state of your service. Create a bind mount and copy the script into it\n- Name of script: check-script.sh\n- Bind mount point: /usr/local/scripts/\n- Runs at regular intervals: 2 seconds\n\n## 🏗️ Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/peterweissdk/keepalived.git\ncd keepalived\n\n# Build the image\ndocker build -t keepalived:latest .\n```\n\n## 📝 Directory Structure\n\n```bash\nkeepalived/\n├── conf/\n│   └── keepalived.conf_tpl\n├── scripts/\n│   └── check_and_run.sh\n├── .github/\n├── .env\n├── Dockerfile\n├── docker-entrypoint.sh\n├── healthcheck.sh\n├── docker-compose.yml\n├── LICENSE\n└── README.md\n```\n\n## 🔍 Health Check\n\nThe container includes a comprehensive health check system that monitors:\n\n1. Keepalived Process Status\n   - Verifies the keepalived daemon is running\n\n2. Virtual IP environment variable\n   - Verifies the VIRTUAL_IPS environment variable is set\n\nView health status:\n```bash\ndocker inspect --format='{{.State.Health.Status}}' keepalived\n```\nView detailed health check history:\n```bash\ndocker inspect --format='{{json .State.Health}}' keepalived | jq\n```\nWatch health status in real-time:\n```bash\nwatch -n 5 'docker inspect --format=\"{{.State.Health.Status}}\" keepalived'\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 🆘 Support\n\nIf you encounter any issues or need support, please file an issue on the GitHub repository.\n\n## 📄 License\n\nThis project is licensed under the GNU GENERAL PUBLIC LICENSE v3.0 - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterweissdk%2Fkeepalived","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterweissdk%2Fkeepalived","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterweissdk%2Fkeepalived/lists"}