{"id":16582854,"url":"https://github.com/winglim/kea-dhcp4","last_synced_at":"2026-04-20T11:02:12.139Z","repository":{"id":85513766,"uuid":"324334183","full_name":"WingLim/kea-dhcp4","owner":"WingLim","description":"Docker image for kea-dhcp4 with amd64, arm64 and arm32v7.","archived":false,"fork":false,"pushed_at":"2021-04-17T05:49:26.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-27T04:43:49.946Z","etag":null,"topics":["docker-image","kea-dhcp"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/winglim/kea-dhcp4","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WingLim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-12-25T09:46:17.000Z","updated_at":"2021-04-17T05:49:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c306727b-6006-475b-810b-d5c36726f946","html_url":"https://github.com/WingLim/kea-dhcp4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WingLim/kea-dhcp4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WingLim%2Fkea-dhcp4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WingLim%2Fkea-dhcp4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WingLim%2Fkea-dhcp4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WingLim%2Fkea-dhcp4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WingLim","download_url":"https://codeload.github.com/WingLim/kea-dhcp4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WingLim%2Fkea-dhcp4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32044291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T10:33:29.490Z","status":"ssl_error","status_checked_at":"2026-04-20T10:32:30.107Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-image","kea-dhcp"],"created_at":"2024-10-11T22:34:23.429Z","updated_at":"2026-04-20T11:02:12.113Z","avatar_url":"https://github.com/WingLim.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kea-dhcp4\n\n![build](https://github.com/WingLim/kea-dhcp4/workflows/build/badge.svg)\n[![Docker Pulls](https://img.shields.io/docker/pulls/winglim/kea-dhcp4?logo=docker)](https://hub.docker.com/r/winglim/kea-dhcp4)\n[![Github Package](https://img.shields.io/static/v1?label=WingLim\u0026message=Github%20Package\u0026color=blue\u0026logo=github)](https://github.com/users/WingLim/packages/container/package/kea-dhcp4)\n![Docker Image Size (latest)](https://img.shields.io/docker/image-size/winglim/kea-dhcp4/latest?label=latest%20size)\n![Docker Image Size (latest-db)](https://img.shields.io/docker/image-size/winglim/kea-dhcp4/latest-db?label=latest-db%20size)\n\nDocker image for kea-dhcp4 with amd64, arm64 and arm32v7.\n\nUsing Alpine 3.13\n\n## Usage\n\n### Use memfile\n\nCreate dir and files.\n\n```shell\nmkdir -p kea-dhcp4/conf\ncd kea-dhcp4\ntouch conf/kea-dhcp4.conf\ntouch dhcp4.leases\ntouch docker-compose.yml\n```\n\n`docker-compose.yml`(same as `examples/docker-compose.file.yaml`):\n\n```yaml\nversion: \"3\"\nservices:\n  kea-dhcp4:\n    image: ghcr.io/winglim/kea-dhcp4\n    # use docker hub\n    # image: winglim/kea-dhcp4\n    volumes:\n      - \"$PWD/conf/kea-dhcp4.conf:/etc/kea/kea-dhcp4.conf\"\n      - \"$PWD/conf/dhcp4.leases:/var/lib/kea/dhcp4.leases\"\n    restart: always\n    network_mode: host\n    container_name: kea-dhcp4\n```\n\n`conf/kea-dhcp4.conf`:\n\nFor more DHCP4 settings: [https://kea.readthedocs.io/en/kea-1.8.1/arm/dhcp4-srv.html](https://kea.readthedocs.io/en/kea-1.8.1/arm/dhcp4-srv.html)\n\n```json\n{\n  \"Dhcp4\": {\n    \"valid-lifetime\": 43200,\n    \"renew-timer\": 1000,\n    \"rebind-timer\": 2000,\n\n    \"interfaces-config\": {\n      \"interfaces\": [\"eth0\"]\n    },\n\n    \"lease-database\": {\n      \"type\": \"memfile\",\n      \"persist\": true,\n      \"name\": \"/var/lib/kea/dhcp4.leases\"\n    },\n\n    \"subnet4\": [\n      {\n        \"subnet\": \"192.168.1.0/24\",\n        \"pools\": [\n          {\n            \"pool\": \"192.168.1.1 - 192.168.1.255\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n### Use MariaDB or PostgreSQL\n\n**NOTICE1: I use `kea-admin` to initialize the database, it may take some time, please be patient.**\n\n**NOTICE2: I use `jq` to parse `kea-dhcp4.conf` to init database for kea-dhcp, jq CAN NOT parse json with comment, so you need to delete all comments.**\n\n`docker-compose.yml`(same as `examples/docker-compose.db.yaml`):\n\nUse `latest-db` tag.\n\n```yaml\nversion: \"3\"\nservices:\n  kea-dhcp4:\n    image: ghcr.io/winglim/kea-dhcp4:latest-db\n    # use docker hub\n    # image: winglim/kea-dhcp4:latest-db\n    volumes:\n      - \"$PWD/conf/kea-dhcp4.conf:/etc/kea/kea-dhcp4.conf\"\n    restart: always\n    network_mode: host\n    container_name: kea-dhcp4\n    depends_on: \n      - mariadb\n\n  mariadb:\n    image: yobasystems/alpine-mariadb\n    environment:\n      - MYSQL_DATABASE=keadhcp4\n      - MYSQL_ROOT_PASSWORD=keapassword\n      - MYSQL_USER=keauser\n      - MYSQL_PASSWORD=keapassword\n    volumes:\n      - \"$PWD/conf/db:/var/lib/mysql\"\n    ports:\n      - 3306:3306\n    restart: always\n    container_name: kea-mariadb\n```\n\nEdit `lease-database` part in `conf/kea-dhcp4.conf`:\n\n```json\n\"lease-database\": {\n    \"type\": \"mysql\",\n    \"host\": \"127.0.0.1\",\n    \"port\": 3306,\n    \"name\": \"keadhcp4\",\n    \"user\": \"keauser\",\n    \"password\": \"keapassword\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinglim%2Fkea-dhcp4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinglim%2Fkea-dhcp4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinglim%2Fkea-dhcp4/lists"}