more stuff
This commit is contained in:
32
Dockerfile
32
Dockerfile
@ -1,27 +1,51 @@
|
||||
FROM debian:latest
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||
LABEL ImageName="registry.gitlab.com/wolutator/yadyn"
|
||||
|
||||
ARG APP_DIR=/opt/app
|
||||
ARG VAR_DIR=$APP_DIR/var
|
||||
ARG DATA_DIR=$VAR_DIR/data
|
||||
ARG LOG_DIR=$VAR_DIR/log
|
||||
ARG BIND_DIR=/etc/bind
|
||||
ARG DYN_ZONES_DIR=$BIND_DIR/dynamic
|
||||
|
||||
RUN \
|
||||
mkdir -p $APP_DIR && \
|
||||
mkdir -p $VAR_DIR && \
|
||||
mkdir -p $DATA_DIR && \
|
||||
mkdir -p $LOG_DIR && \
|
||||
mkdir -p $DYN_ZONES_DIR && \
|
||||
apt update && \
|
||||
apt install -y bind9 && \
|
||||
apt install -y python3 && \
|
||||
apt install -y python3-pip && \
|
||||
apt install -y python3-dnspython
|
||||
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 && \
|
||||
/usr/sbin/tsig-keygen local. > /etc/bind/local.key && \
|
||||
echo "include \"/etc/bind/local.key\";" >> /etc/bind/named.conf && \
|
||||
echo "include \"/etc/bind/dynamic/dynamic-zones.conf\";" >> /etc/bind/named.conf && \
|
||||
echo "include \"/etc/bind/named.conf.logging\";" >> /etc/bind/named.conf
|
||||
|
||||
COPY ./server/ $APP_DIR
|
||||
COPY ./bind/named.conf.logging $BIND_DIR
|
||||
COPY ./bind/dynamic-zones.conf $DYN_ZONES_DIR
|
||||
COPY ./bind/dynamic.hottis.de $DYN_ZONES_DIR
|
||||
|
||||
RUN \
|
||||
cat /etc/bind/local.key && \
|
||||
KEY=`cat /etc/bind/local.key | awk -F\" '/secret/ {print $2}'` && \
|
||||
echo $KEY && \
|
||||
sed -i "s,KEYVALUE,$KEY," $APP_DIR/yadyn
|
||||
|
||||
EXPOSE 8023/tcp
|
||||
EXPOSE 8053/udp
|
||||
EXPOSE 8053/tcp
|
||||
EXPOSE 53/udp
|
||||
EXPOSE 53/tcp
|
||||
|
||||
VOLUME $VAR_DIR
|
||||
VOLUME $DYN_ZONES_DIR
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user