Merge ~athos-ribeiro/ubuntu-docker-images/+git/bind9:9.16-20.04-lp1955680 into ~ubuntu-docker-images/ubuntu-docker-images/+git/bind9:9.16-20.04

Proposed by Athos Ribeiro
Status: Merged
Merged at revision: 50368c03d131a133253b2a046e5f695e751768bb
Proposed branch: ~athos-ribeiro/ubuntu-docker-images/+git/bind9:9.16-20.04-lp1955680
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/bind9:9.16-20.04
Diff against target: 79 lines (+16/-7)
4 files modified
Dockerfile (+3/-2)
docker-entrypoint.sh (+1/-1)
examples/README.md (+2/-2)
examples/bind9-deployment.yml (+10/-2)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Bryce Harrington Pending
Canonical Server Pending
Review via email: mp+414930@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP and for the thorough investigation, Athos.

I played around with your proposed changes and I'm happy with the results. I also agree with them, so I'm a +1 here. LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index da6937b..62e0f40 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -13,16 +13,17 @@ RUN set -eux; \
6 ; \
7 DEBIAN_FRONTEND=noninteractive apt-get remove --purge --auto-remove -y; \
8 rm -rf /var/lib/apt/lists/*; \
9+# prepare runtime directories
10+ install -d -m 0755 -o bind -g bind /run/named; \
11 # smoke test
12 named -v; \
13 # create manifest
14 mkdir -p /usr/share/rocks; \
15 (echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > /usr/share/rocks/dpkg.query
16
17-USER bind
18 VOLUME ["/var/cache/bind", "/var/lib/bind"]
19
20-EXPOSE 53
21+EXPOSE 53/tcp 53/udp 953/tcp
22
23 COPY docker-entrypoint.sh /usr/local/bin/
24 ENTRYPOINT ["docker-entrypoint.sh"]
25diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
26index c0cf2fd..4c8d14d 100755
27--- a/docker-entrypoint.sh
28+++ b/docker-entrypoint.sh
29@@ -14,7 +14,7 @@ fi
30 if [[ -z "${1}" ]]; then
31 echo "Starting named..."
32 echo "exec $(which named) -g \"${EXTRA_ARGS}\""
33- exec $(command -v named) -g ${EXTRA_ARGS}
34+ exec $(command -v named) -u bind -g ${EXTRA_ARGS}
35 else
36 exec "${@}"
37 fi
38diff --git a/examples/README.md b/examples/README.md
39index d69b8a8..067b660 100644
40--- a/examples/README.md
41+++ b/examples/README.md
42@@ -37,7 +37,7 @@ $ microk8s enable dns storage
43 Apply the `microk8s-deployments.yml`:
44
45 ```
46-$ microk8s kubectl apply -f microk8s-deployments.yml
47+$ microk8s kubectl apply -f bind9-deployment.yml
48 ```
49
50-Bind9 will be listening on port `53` in your host.
51+Bind9 will be listening on port `5353` in your host.
52diff --git a/examples/bind9-deployment.yml b/examples/bind9-deployment.yml
53index 72cc563..551f1f2 100644
54--- a/examples/bind9-deployment.yml
55+++ b/examples/bind9-deployment.yml
56@@ -9,7 +9,14 @@ spec:
57 selector:
58 app: bind9
59 ports:
60- - port: 53
61+ - protocol: TCP
62+ port: 5353
63+ targetPort: 53
64+ name: bind9-tcp
65+ - protocol: UDP
66+ port: 5353
67+ targetPort: 53
68+ name: bind9
69 ---
70 apiVersion: apps/v1
71 kind: Deployment
72@@ -31,5 +38,6 @@ spec:
73 env:
74 ports:
75 - containerPort: 53
76- name: bind9
77 protocol: TCP
78+ - containerPort: 53
79+ protocol: UDP

Subscribers

People subscribed via source and target branches