Skip to content

Keepalived docker image for amd64, i386, arm64, armv6, & armv7.

License

Notifications You must be signed in to change notification settings

rmartin16/docker-keepalived

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-keepalived

Keepalived Docker image for amd64, i386, arm64, armv6, armv7.

Quick start

docker run \
    --name keepalived \
    --cap-add=NET_ADMIN \
    --net=host \
    --detach \
    ghcr.io/rmartin16/keepalived:v2.2.7

Environment Variables

The configuration can be set using environment variables:

docker run \
    --env INTERFACE=eth1 \
    --env STATE=BACKUP \
    --name keepalived \
    --cap-add=NET_ADMIN \
    --net=host \
    --detach \
    ghcr.io/rmartin16/keepalived:v2.2.7
  • INTERFACE: Defaults to eth0
  • STATE: Default state. Defaults to BACKUP
  • ROUTER_ID: Virtual router ID. Defaults to 41
  • PRIORITY: Node priority. Defaults to 100
  • UNICAST_PEERS: Unicast peers, space-separated. Defaults to 192.168.2.101 192.168.2.102 192.168.2.103
  • VIRTUAL_IPS: Defaults to 192.168.2.100/24
  • PASSWORD: Defaults to KeptAliv
  • NOTIFY: Notify script. Defaults to /notify.sh

Configuration file

Example:

docker run \
    --name keepalived \
    --cap-add=NET_ADMIN \
    --net=host \
    --volume $(pwd)/keepalived.conf:/etc/keepalived/keepalived.conf \
    --detach \
    ghcr.io/rmartin16/keepalived:v2.2.7

docker-compose

version: "3"
services:
  keepalived:
    container_name: keepalived
    image: ghcr.io/rmartin16/keepalived:v2.2.7
    network_mode: host
    cap_add:
      - NET_ADMIN
    volumes:
      - ./config/keepalived/keepalived.conf:/etc/keepalived/keepalived.conf
    restart: unless-stopped

Sources

Oracle Linux Administrator's Guide

Direct parent: rvben/rpi-keepalived

Transitive parent: osixia/docker-keepalived

About

Keepalived docker image for amd64, i386, arm64, armv6, & armv7.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages