Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit 760ab67

Browse files
committed
Added extra tag called 'ldap' with isc-dhcp-server-ldap package installed
Also added additional build and run scripts for that variant. This way of doing it duplicates a lot of code, but it does work. If anyone has an idea of how to only use a single Dockerfile with an environment variable or something like that to avoid the code duplication then I'd very much like a pull request that solves this issue. Same goes for the build and run scripts.
1 parent ea6bb0f commit 760ab67

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

Dockerfile.ldap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM ubuntu:18.04
2+
3+
MAINTAINER Robin Smidsrød <[email protected]>
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get -q -y update \
8+
&& apt-get -q -y -o "DPkg::Options::=--force-confold" -o "DPkg::Options::=--force-confdef" install apt-utils \
9+
&& apt-get -q -y -o "DPkg::Options::=--force-confold" -o "DPkg::Options::=--force-confdef" install dumb-init isc-dhcp-server-ldap man \
10+
&& apt-get -q -y autoremove \
11+
&& apt-get -q -y clean \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
COPY util/entrypoint.sh /entrypoint.sh
15+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ warning will be emitted informing you that you've probably forgotten it.
4848
If a `/data` volume is not provided with a `dhcpd.conf` inside it, the
4949
container will exit early with an error message.
5050

51+
An additional Dockerfile has been added that allows building an image with
52+
the tag `:ldap` which contains the **isc-dhcp-server-ldap** package in
53+
addition to the normal DHCP server package. Other than that it behaves in
54+
exactly the same way as the `:latest` tag. Utility build and run scripts
55+
have also been added to work with this variant.
56+
5157
Acknowledgements
5258
================
5359

build_ldap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker build -t networkboot/dhcpd:ldap -f Dockerfile.ldap "$@" $(dirname $0)

run_ldap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
pushd $(dirname $0) >/dev/null
3+
data_dir="$(pwd)/data"
4+
docker run -ti --rm --init --net host -v "$data_dir":/data networkboot/dhcpd:ldap "$@"
5+
popd >/dev/null

0 commit comments

Comments
 (0)