forked from bowdoincollege/noc-commit-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (18 loc) · 759 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM debian:jessie
# install any dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y -q --no-install-recommends bind9 isc-dhcp-server && \
rm -rf /var/lib/apt/lists/*
# we cannot use chroot, since pre-commit runs docker as non-root user
# prepare bind configuration directory to be writable
RUN rm -rf /etc/bind /etc/dhcp && \
mkdir /etc/bind /etc/dhcp && \
chmod 777 /etc/bind /etc/dhcp
# debian uses /etc/dhcp3, we use /etc/dhcp: symlink them
RUN ln -s dhcp /etc/dhcp3
# add all hook entrypoints
ADD hooks/check-dns-config.sh /usr/bin/check-dns-config
ADD hooks/check-dhcp-config.sh /usr/bin/check-dhcp-config
RUN chmod a+x /usr/bin/check-dns-config && \
chmod a+x /usr/bin/check-dhcp-config