Dockerfile: Improve file permissions for docker build images using bind9
/etc/init.d/bind9 is run as the 'bind' user. This fixes file permissions for the configuration files added by the Dockerfile to match.release-3.3
parent
077b361bfc
commit
abc81d03a7
|
@ -2,16 +2,17 @@ FROM golang:1.9.1-stretch
|
||||||
LABEL Description="Image for etcd DNS SRV testing"
|
LABEL Description="Image for etcd DNS SRV testing"
|
||||||
|
|
||||||
RUN apt update -y \
|
RUN apt update -y \
|
||||||
&& apt install -y \
|
&& apt install -y -q \
|
||||||
bind9 \
|
bind9 \
|
||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
RUN mkdir /var/bind
|
RUN mkdir -p /var/bind /etc/bind
|
||||||
RUN chown bind /var/bind
|
RUN chown root:bind /var/bind /etc/bind
|
||||||
ADD Procfile /Procfile
|
ADD Procfile /Procfile
|
||||||
ADD run.sh /run.sh
|
ADD run.sh /run.sh
|
||||||
|
|
||||||
ADD named.conf etcd.zone rdns.zone /etc/bind/
|
ADD named.conf etcd.zone rdns.zone /etc/bind/
|
||||||
|
RUN chown root:bind /etc/bind/named.conf /etc/bind/etcd.zone /etc/bind/rdns.zone
|
||||||
ADD resolv.conf /etc/resolv.conf
|
ADD resolv.conf /etc/resolv.conf
|
||||||
|
|
||||||
RUN go get github.com/mattn/goreman
|
RUN go get github.com/mattn/goreman
|
||||||
|
|
|
@ -2,16 +2,17 @@ FROM golang:1.9.1-stretch
|
||||||
LABEL Description="Image for etcd DNS testing"
|
LABEL Description="Image for etcd DNS testing"
|
||||||
|
|
||||||
RUN apt update -y \
|
RUN apt update -y \
|
||||||
&& apt install -y \
|
&& apt install -y -q \
|
||||||
bind9 \
|
bind9 \
|
||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
RUN mkdir /var/bind
|
RUN mkdir -p /var/bind /etc/bind
|
||||||
RUN chown bind /var/bind
|
RUN chown root:bind /var/bind /etc/bind
|
||||||
ADD Procfile.tls /Procfile.tls
|
ADD Procfile.tls /Procfile.tls
|
||||||
ADD run.sh /run.sh
|
ADD run.sh /run.sh
|
||||||
|
|
||||||
ADD named.conf etcd.zone rdns.zone /etc/bind/
|
ADD named.conf etcd.zone rdns.zone /etc/bind/
|
||||||
|
RUN chown root:bind /etc/bind/named.conf /etc/bind/etcd.zone /etc/bind/rdns.zone
|
||||||
ADD resolv.conf /etc/resolv.conf
|
ADD resolv.conf /etc/resolv.conf
|
||||||
|
|
||||||
RUN go get github.com/mattn/goreman
|
RUN go get github.com/mattn/goreman
|
||||||
|
|
Loading…
Reference in New Issue