Merge ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:wrapper into charm-k8s-bind:master

Proposed by Barry Price
Status: Merged
Approved by: Barry Price
Approved revision: 87fa1ab2ed824166e63b03caa8c53677e144fd15
Merged at revision: 04821b38c11acb7a7f452ae3eeaa1ddb3e2406c9
Proposed branch: ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:wrapper
Merge into: charm-k8s-bind:master
Diff against target: 50 lines (+7/-6)
3 files modified
Makefile (+1/-1)
dockerfile (+4/-5)
image-scripts/docker-wrapper.sh (+2/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Barry Price Pending
Review via email: mp+402966@code.launchpad.net

Commit message

Convert from using both ENTRYPOINT and CMD to a single wrapper script that sets up our config and then starts the bind service

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 04821b38c11acb7a7f452ae3eeaa1ddb3e2406c9

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/Makefile b/Makefile
index 35b100d..564aeb9 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ image-deps:
3030
31image-lint: image-deps31image-lint: image-deps
32 @echo "Running shellcheck."32 @echo "Running shellcheck."
33 @shellcheck image-scripts/docker-entrypoint.sh33 @shellcheck image-scripts/docker-wrapper.sh
34 @shellcheck image-scripts/dns-check.sh34 @shellcheck image-scripts/dns-check.sh
3535
36image-build: image-lint36image-build: image-lint
diff --git a/dockerfile b/dockerfile
index 968d4fd..94856fb 100644
--- a/dockerfile
+++ b/dockerfile
@@ -19,15 +19,14 @@ RUN apt-get update && apt-get -y dist-upgrade \
19 && apt-get --purge autoremove -y \19 && apt-get --purge autoremove -y \
20 && apt-get install -y bind9 dnsutils git ${EXTRA_PKGS_TO_INSTALL}20 && apt-get install -y bind9 dnsutils git ${EXTRA_PKGS_TO_INSTALL}
2121
22# entrypoint script will configure Bind based on env variables22# wrapper script will configure Bind based on env variables and run it
23# dns-check script will provide a readinessProbe23# dns-check script will provide a readinessProbe
24COPY ./image-scripts/docker-entrypoint.sh /usr/local/bin/24COPY ./image-scripts/docker-wrapper.sh /usr/local/bin/
25COPY ./image-scripts/dns-check.sh /usr/local/bin/25COPY ./image-scripts/dns-check.sh /usr/local/bin/
26RUN chmod 0755 /usr/local/bin/docker-entrypoint.sh26RUN chmod 0755 /usr/local/bin/docker-wrapper.sh
27RUN chmod 0755 /usr/local/bin/dns-check.sh27RUN chmod 0755 /usr/local/bin/dns-check.sh
2828
29EXPOSE 53/udp29EXPOSE 53/udp
30EXPOSE 53/tcp30EXPOSE 53/tcp
3131
32ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]32CMD ["/usr/local/bin/docker-wrapper.sh"]
33CMD /usr/sbin/named -g -u bind -c /etc/bind/named.conf
diff --git a/image-scripts/docker-entrypoint.sh b/image-scripts/docker-wrapper.sh
34similarity index 97%33similarity index 97%
35rename from image-scripts/docker-entrypoint.sh34rename from image-scripts/docker-entrypoint.sh
36rename to image-scripts/docker-wrapper.sh35rename to image-scripts/docker-wrapper.sh
index 2ed0857..4f807e1 100644
--- a/image-scripts/docker-entrypoint.sh
+++ b/image-scripts/docker-wrapper.sh
@@ -21,3 +21,5 @@ if [ -d "${BIND_CONFDIR}" ]; then
21else21else
22 echo "Something went wrong, ${BIND_CONFDIR} does not exist, not starting";22 echo "Something went wrong, ${BIND_CONFDIR} does not exist, not starting";
23fi23fi
24
25/usr/sbin/named -g -u bind -c /etc/bind/named.conf

Subscribers

People subscribed via source and target branches

to all changes: