{"id":13588077,"url":"https://github.com/osixia/docker-keepalived","last_synced_at":"2025-04-04T21:07:14.380Z","repository":{"id":33478763,"uuid":"37124475","full_name":"osixia/docker-keepalived","owner":"osixia","description":"Keepalived container image 🐳🌴","archived":false,"fork":false,"pushed_at":"2023-12-23T14:17:20.000Z","size":111,"stargazers_count":410,"open_issues_count":32,"forks_count":153,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T20:07:36.264Z","etag":null,"topics":["docker","docker-image","keepalived"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/osixia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-06-09T09:59:49.000Z","updated_at":"2025-03-17T05:03:10.000Z","dependencies_parsed_at":"2025-01-05T02:08:39.537Z","dependency_job_id":"7f21dfdf-e2c8-46fa-bf30-a297dcc2022e","html_url":"https://github.com/osixia/docker-keepalived","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-keepalived","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-keepalived/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-keepalived/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-keepalived/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osixia","download_url":"https://codeload.github.com/osixia/docker-keepalived/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249524,"owners_count":20908212,"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","docker-image","keepalived"],"created_at":"2024-08-01T15:06:29.920Z","updated_at":"2025-04-04T21:07:14.358Z","avatar_url":"https://github.com/osixia.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# osixia/keepalived\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/osixia/keepalived.svg)][hub]\n[![Docker Stars](https://img.shields.io/docker/stars/osixia/keepalived.svg)][hub]\n[![](https://images.microbadger.com/badges/image/osixia/keepalived.svg)](http://microbadger.com/images/osixia/keepalived \"Get your own image badge on microbadger.com\")\n\n[hub]: https://hub.docker.com/r/osixia/keepalived/\n\nLatest release: 2.0.20 - Keepalived 2.0.20 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/keepalived/) \n\n**A docker image to run Keepalived.**\n\u003e [keepalived.org](http://keepalived.org/)\n\n- [osixia/keepalived](#osixiakeepalived)\n\t- [Quick start](#quick-start)\n\t- [Beginner Guide](#beginner-guide)\n\t\t- [Use your own Keepalived config](#use-your-own-keepalived-config)\n\t\t- [Fix docker mounted file problems](#fix-docker-mounted-file-problems)\n\t\t- [Debug](#debug)\n\t- [Environment Variables](#environment-variables)\n\t\t- [Set your own environment variables](#set-your-own-environment-variables)\n\t\t\t- [Use command line argument](#use-command-line-argument)\n\t\t\t- [Link environment file](#link-environment-file)\n\t\t\t- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)\n\t- [Advanced User Guide](#advanced-user-guide)\n\t\t- [Extend osixia/keepalived:2.0.20 image](#extend-osixiakeepalived2020-image)\n\t\t- [Make your own keepalived image](#make-your-own-keepalived-image)\n\t\t- [Tests](#tests)\n\t\t- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)\n\t- [Security](#security)\n\t- [Changelog](#changelog)\n\n## Quick start\n\nThis image require the kernel module ip_vs loaded on the host (`modprobe ip_vs`) and need to be run with : --cap-add=NET_ADMIN --net=host\n\n    docker run --cap-add=NET_ADMIN --cap-add=NET_BROADCAST --cap-add=NET_RAW --net=host -d osixia/keepalived:2.0.20\n\n## Beginner Guide\n\n### Use your own Keepalived config\nThis image comes with a keepalived config file that can be easily customized via environment variables for a quick bootstrap,\nbut setting your own keepalived.conf is possible. 2 options:\n\n- Link your config file at run time to `/container/service/keepalived/assets/keepalived.conf` :\n\n      docker run --volume /data/my-keepalived.conf:/container/service/keepalived/assets/keepalived.conf --detach osixia/keepalived:2.0.20\n\n- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)\n\n### Fix docker mounted file problems\n\nYou may have some problems with mounted files on some systems. The startup script try to make some file adjustment and fix files owner and permissions, this can result in multiple errors. See [Docker documentation](https://docs.docker.com/v1.4/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume).\n\nTo fix that run the container with `--copy-service` argument :\n\n\t\tdocker run [your options] osixia/keepalived:2.0.20 --copy-service\n\n### Debug\n\nThe container default log level is **info**.\nAvailable levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.\n\nExample command to run the container in `debug` mode:\n\n\tdocker run --detach osixia/keepalived:2.0.20 --loglevel debug\n\nSee all command line options:\n\n\tdocker run osixia/keepalived:2.0.20 --help\n\n\n## Environment Variables\n\nEnvironment variables defaults are set in **image/environment/default.yaml**\n\nSee how to [set your own environment variables](#set-your-own-environment-variables)\n\n\n- **KEEPALIVED_INTERFACE**: Keepalived network interface. Defaults to `eth0`\n- **KEEPALIVED_PASSWORD**: Keepalived password. Defaults to `d0cker`\n- **KEEPALIVED_PRIORITY** Keepalived node priority. Defaults to `150`\n- **KEEPALIVED_ROUTER_ID** Keepalived virtual router ID. Defaults to `51`\n\n- **KEEPALIVED_UNICAST_PEERS** Keepalived unicast peers. Defaults to :\n      - 192.168.1.10\n      - 192.168.1.11\n\n  If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:\n\n      docker run --env KEEPALIVED_UNICAST_PEERS=\"#PYTHON2BASH:['192.168.1.10', '192.168.1.11']\" --detach osixia/keepalived:2.0.20\n\n  To convert yaml to python online : http://yaml-online-parser.appspot.com/\n\n\n- **KEEPALIVED_VIRTUAL_IPS** Keepalived virtual IPs. Defaults to :\n\n      - 192.168.1.231\n      - 192.168.1.232\n\n  If you want to set this variable at docker run command convert the yaml in python, see above.\n\n- **KEEPALIVED_NOTIFY** Script to execute when node state change. Defaults to `/container/service/keepalived/assets/notify.sh`\n\n- **KEEPALIVED_COMMAND_LINE_ARGUMENTS** Keepalived command line arguments; Defaults to `--log-detail --dump-conf`\n\n- **KEEPALIVED_STATE** The starting state of keepalived; it can either be MASTER or BACKUP.\n\n### Set your own environment variables\n\n#### Use command line argument\nEnvironment variables can be set by adding the --env argument in the command line, for example:\n\n    docker run --env KEEPALIVED_INTERFACE=\"eno1\" --env KEEPALIVED_PASSWORD=\"password!\" \\\n    --env KEEPALIVED_PRIORITY=\"100\" --detach osixia/keepalived:2.0.20\n\n\n#### Link environment file\n\nFor example if your environment file is in :  /data/environment/my-env.yaml\n\n\tdocker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \\\n\t--detach osixia/keepalived:2.0.20\n\nTake care to link your environment file to `/container/environment/XX-somedir` (with XX \u003c 99 so they will be processed before default environment files) and not  directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).\n\n#### Make your own image or extend this image\n\nThis is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.\n\n## Advanced User Guide\n\n### Extend osixia/keepalived:2.0.20 image\n\nIf you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.\n\nDockerfile example:\n\n    FROM osixia/keepalived:2.0.20\n    MAINTAINER Your Name \u003cyour@name.com\u003e\n\n    ADD keepalived.conf /container/service/keepalived/assets/keepalived.conf\n    ADD environment /container/environment/01-custom\n    ADD scripts.sh /container/service/keepalived/assets/notify.sh\n\n\n### Make your own keepalived image\n\n\nClone this project :\n\n\tgit clone https://github.com/osixia/docker-keepalived\n\tcd docker-keepalived\n\nAdapt Makefile, set your image NAME and VERSION, for example :\n\n\tNAME = osixia/keepalived\n\tVERSION = 1.3.5\n\n\tbecomes :\n\tNAME = billy-the-king/keepalived\n\tVERSION = 0.1.0\n\nAdd your custom scripts, environment files, config ...\n\nBuild your image :\n\n\tmake build\n\nRun your image :\n\n\tdocker run -d billy-the-king/keepalived:0.1.0\n\n### Tests\n\nWe use **Bats** (Bash Automated Testing System) to test this image:\n\n\u003e [https://github.com/bats-core/bats-core](https://github.com/bats-core/bats-core)\n\nInstall Bats, and in this project directory run :\n\n\tmake test\n\n\n### Under the hood: osixia/light-baseimage\n\nThis image is based on osixia/light-baseimage.\nMore info: https://github.com/osixia/docker-light-baseimage\n\n## Security\nIf you discover a security vulnerability within this docker image, please send an email to the Osixia! team at security@osixia.net. For minor vulnerabilities feel free to add an issue here on github.\n\nPlease include as many details as possible.\n\n## Changelog\n\nPlease refer to: [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-keepalived","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosixia%2Fdocker-keepalived","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-keepalived/lists"}