Created
January 22, 2018 07:11
-
-
Save yohgaki/d6943d53a5e3ef6841ef660bd9cbfa90 to your computer and use it in GitHub Desktop.
Simpel Dockerfile for Alpine + DJBDNS (tinydns and axfrdns. No dnscache.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
MAINTAINER Yasuo Ohgaki version: 0.1 | |
RUN \ | |
apk update; \ | |
apk add gcc g++ make curl openssh-client rsync perl-net-dns | |
RUN \ | |
mkdir /package; \ | |
cd /package/; \ | |
curl --output daemontools-0.76.tar.gz https://cr.yp.to/daemontools/daemontools-0.76.tar.gz; \ | |
curl -o ucspi-tcp-0.88.tar.gz https://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz; \ | |
curl -o djbdns-1.05.tar.gz https://cr.yp.to/djbdns/djbdns-1.05.tar.gz; | |
RUN \ | |
cd /package; \ | |
ls -la; \ | |
tar zxvf daemontools-0.76.tar.gz; \ | |
cd admin/daemontools-0.76/; \ | |
echo gcc -O2 -include /usr/include/errno.h > src/conf-cc; \ | |
./package/install; | |
RUN \ | |
cd /package; \ | |
ls -la; \ | |
tar zxvf ucspi-tcp-0.88.tar.gz; \ | |
cd ucspi-tcp-0.88/; \ | |
echo gcc -O2 -include /usr/include/errno.h > conf-cc; \ | |
make; \ | |
make setup check; | |
RUN \ | |
cd /package; \ | |
ls -la; \ | |
tar zxvf djbdns-1.05.tar.gz; \ | |
cd djbdns-1.05/; \ | |
echo gcc -O2 -include /usr/include/errno.h > conf-cc; \ | |
make; \ | |
make setup check; | |
RUN \ | |
adduser -D tinydns; \ | |
adduser -D dnslog; \ | |
tinydns-conf tinydns dnslog /etc/tinydns 0.0.0.0; \ | |
ln -s /etc/tinydns /service/tinydns; | |
RUN \ | |
adduser -D axfrdns; \ | |
axfrdns-conf axfrdns dnslog /etc/axfrdns /etc/tinydns 0.0.0.0; \ | |
ln -s /etc/axfrdns /service/axfrdns | |
EXPOSE 53/tcp | |
EXPOSE 53/udp | |
CMD svscan /service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment