Skip to content

Commit

Permalink
Allow pdns containers to run rootless
Browse files Browse the repository at this point in the history
  • Loading branch information
pschiffe committed Feb 5, 2024
1 parent a10e85c commit e34dcd9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pdns-mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& dnf --setopt 'tsflags=' install pdns-backend-mysql \
&& dnf clean all

RUN mkdir -p /run/pdns \
&& chown -R pdns: /etc/pdns /run/pdns

COPY pdns.conf.tpl docker-entrypoint.sh /

ENV VERSION=4.8 \
Expand Down
3 changes: 3 additions & 0 deletions pdns-mysql/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& apk add --allow-untrusted subvars.apk \
&& rm -rf subvars.apk /var/cache/apk/*

RUN mkdir -p /run/pdns \
&& chown -R pdns: /etc/pdns /run/pdns

COPY pdns.conf.tpl docker-entrypoint.sh /

ENV VERSION=4.8 \
Expand Down
3 changes: 3 additions & 0 deletions pdns-pgsql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& dnf --setopt 'tsflags=' install pdns-backend-postgresql \
&& dnf clean all

RUN mkdir -p /run/pdns \
&& chown -R pdns: /etc/pdns /run/pdns

COPY pdns.conf.tpl docker-entrypoint.sh /

ENV VERSION=4.8 \
Expand Down
3 changes: 3 additions & 0 deletions pdns-pgsql/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& apk add --allow-untrusted subvars.apk \
&& rm -rf subvars.apk /var/cache/apk/*

RUN mkdir -p /run/pdns \
&& chown -R pdns: /etc/pdns /run/pdns

COPY pdns.conf.tpl docker-entrypoint.sh /

ENV VERSION=4.8 \
Expand Down
2 changes: 1 addition & 1 deletion pdns-recursor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& dnf clean all

RUN mkdir -p /etc/pdns-recursor/api.d /run/pdns-recursor \
&& chown -R pdns-recursor: /etc/pdns-recursor/api.d /run/pdns-recursor
&& chown -R pdns-recursor: /etc/pdns-recursor /run/pdns-recursor

COPY recursor.conf.tpl docker-entrypoint.sh /

Expand Down
2 changes: 1 addition & 1 deletion pdns-recursor/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \
&& rm -rf subvars.apk /var/cache/apk/*

RUN mkdir -p /etc/pdns/api.d /var/run/pdns-recursor \
&& chown -R recursor: /etc/pdns/api.d /var/run/pdns-recursor
&& chown -R recursor: /etc/pdns /var/run/pdns-recursor

COPY recursor.conf.tpl docker-entrypoint.sh /

Expand Down

0 comments on commit e34dcd9

Please sign in to comment.