yadyn/Dockerfile

52 lines
1.4 KiB
Docker
Raw Normal View History

2019-11-26 16:05:19 +01:00
FROM debian:latest
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
2019-11-27 14:49:46 +00:00
LABEL ImageName="registry.gitlab.com/wolutator/yadyn"
2019-11-26 16:05:19 +01:00
ARG APP_DIR=/opt/app
ARG VAR_DIR=$APP_DIR/var
ARG DATA_DIR=$VAR_DIR/data
ARG LOG_DIR=$VAR_DIR/log
2019-11-27 14:49:46 +00:00
ARG BIND_DIR=/etc/bind
ARG DYN_ZONES_DIR=$BIND_DIR/dynamic
2019-11-26 16:05:19 +01:00
RUN \
mkdir -p $APP_DIR && \
mkdir -p $VAR_DIR && \
mkdir -p $DATA_DIR && \
mkdir -p $LOG_DIR && \
2019-11-27 16:58:38 +00:00
mkdir -p $LOG_DIR/actionlog && \
2019-11-27 14:49:46 +00:00
mkdir -p $DYN_ZONES_DIR && \
2019-11-26 16:05:19 +01:00
apt update && \
apt install -y bind9 && \
2019-11-27 14:49:46 +00:00
apt install -y python && \
apt install -y python-pip && \
apt install -y python-dnspython && \
apt install -y dnsutils && \
apt install -y vim.tiny && \
apt install -y procps && \
2019-11-27 16:58:38 +00:00
apt install -y less && \
apt install -y netcat && \
2019-11-27 14:49:46 +00:00
echo "include \"/etc/bind/local.key\";" >> /etc/bind/named.conf && \
echo "include \"/etc/bind/dynamic/dynamic-zones.conf\";" >> /etc/bind/named.conf && \
2019-11-27 22:47:02 +01:00
echo "include \"/etc/bind/named.conf.rndc\";" >> /etc/bind/named.conf
2019-11-27 14:49:46 +00:00
echo "include \"/etc/bind/named.conf.logging\";" >> /etc/bind/named.conf
2019-11-26 16:05:19 +01:00
COPY ./server/ $APP_DIR
2019-11-27 14:49:46 +00:00
COPY ./bind/named.conf.logging $BIND_DIR
2019-11-27 22:47:02 +01:00
COPY ./bind/named.conf.rndc $BIND_DIR
2019-11-27 14:49:46 +00:00
COPY ./bind/dynamic-zones.conf $DYN_ZONES_DIR
COPY ./bind/dynamic.hottis.de $DYN_ZONES_DIR
2019-11-27 16:58:38 +00:00
COPY ./yadynns.sh $APP_DIR
2019-11-26 16:05:19 +01:00
EXPOSE 8023/tcp
EXPOSE 8053/udp
2019-11-27 14:49:46 +00:00
EXPOSE 53/tcp
2019-11-26 16:05:19 +01:00
VOLUME $VAR_DIR
2019-11-27 14:49:46 +00:00
VOLUME $DYN_ZONES_DIR
2019-11-27 16:58:38 +00:00
WORKDIR $APP_DIR
CMD ./yadynns.sh
2019-11-27 14:49:46 +00:00