osixia
container-keepalived
Shell

Keepalived container image ๐Ÿณ๐Ÿ›Ÿ๐ŸŒด

Last updated Jul 2, 2026
433
Stars
155
Forks
1
Issues
0
Stars/day
Attention Score
85
Language breakdown
Shell 53.0%
Dockerfile 28.8%
Go 18.2%
โ–ธ Files click to expand
README

osixia/keepalived ๐Ÿณ๐Ÿ›Ÿ๐ŸŒด

[docker hub]: https://hub.docker.com/r/osixia/keepalived [github]: https://github.com/osixia/container-keepalived

[Docker Pulls][docker hub] [Docker Stars][docker hub] [GitHub Stars][github] Contributors

Production-ready Keepalived container image for VRRP high availability and VIP failover with dynamic configuration and hot reload.

osixia/keepalived logo.

- โšก Quick Start - ๐Ÿ”ค Environment Variables - ๐Ÿ“„ Documentation - ๐Ÿ”€ Contributing - ๐Ÿ”“ License

โšก Quick Start

This image requires the ipvs kernel module to be loaded on the host (modprobe ipvs). It must be run with the following Docker options:

bash
docker run --cap-add=NETADMIN --cap-add=NETRAW --cap-add=NET_BROADCAST --network=host osixia/keepalived

Using your own Keepalived configuration

This image ships with a Keepalived configuration template that can be customized using environment variables for quick bootstrapping.

You can also provide your own keepalived.conf by mounting it at the path defined by KEEPALIVED_CONF (default: /etc/keepalived/keepalived.conf):

bash
docker run --volume /data/my-keepalived.conf:/etc/keepalived/keepalived.conf osixia/keepalived

Passing command-line arguments to Keepalived

The osixia/keepalived container allows you to pass additional command-line arguments directly to the keepalived binary.

Arguments specified after -- are forwarded to the keepalived process inside the container:

bash
docker run osixia/keepalived -- --dont-release-ipvs

Debugging

To debug the container manually, you can start it with an interactive shell.

The --debug option from osixia/baseimage enables debug logging, installs debugging tools, and launches an interactive shell.

If Keepalived keeps crashing, you can add --skip-process to start the container without launching service processes.

bash
docker run -it osixia/keepalived --debug
docker run -it osixia/keepalived --skip-process --debug

You can also enable Keepalived debugging options:

bash docker run osixia/keepalived -- --log-detail --dump-conf

To see all available command-line options:

bash docker run --rm osixia/keepalived --help # osixia/baseimage options docker run --rm osixia/keepalived -x keepalived -- --help # keepalived command-line options

๐Ÿ”ค Environment Variables

| Variable | Description | Default | | ------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------- | | KEEPALIVED_CONF | Path to the Keepalived configuration file | /etc/keepalived/keepalived.conf | | KEEPALIVEDCONFTEMPLATE | Path to the configuration template used to generate keepalived.conf | /container/services/keepalived-conf/assets/confs/keepalived.conf.template | | KEEPALIVEDCONFRELOAD_SCRIPT | Script executed when configuration changes are detected | /container/services/keepalived-conf/assets/scripts/reload.sh | | KEEPALIVED_INTERFACE | Network interface used by VRRP | eth0 | | KEEPALIVED_STATE | Initial VRRP state (MASTER or BACKUP) | BACKUP | | KEEPALIVEDROUTERID | VRRP router ID | 51 | | KEEPALIVED_PRIORITY | VRRP priority of the node | 150 | | KEEPALIVEDUNICASTPEERS | List of peer nodes used for VRRP unicast communication | 192.168.1.10 192.168.1.11 | | KEEPALIVEDVIRTUALIPS | Virtual IP addresses managed by Keepalived | 192.168.1.231 192.168.1.232 | | KEEPALIVED_PASSWORD | VRRP authentication password | d0cker | | KEEPALIVEDNOTIFYSCRIPT | Script executed when Keepalived state changes | /container/services/keepalived/assets/scripts/notify.sh |

๐Ÿ“„ Documentation

See full documentation and complete features list on osixia/keepalived documentation.

This image is based on osixia/baseimage.

๐Ÿ”€ Contributing

If you find this project useful here's how you can help:

  • Send a pull request with new features and bug fixes.
  • Help new users with issues they may encounter.
  • Support the development of this image and star [this repo][github] and the image [docker hub repository][docker hub].
This project use dagger as CI/CD tool to build, test and deploy images. See source code and usefull command lines in build directory.

๐Ÿ”“ License

This project is licensed under the terms of the MIT license. See LICENSE.md file for more information.

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท osixia/container-keepalived ยท Updated daily from GitHub