aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2017-11-26 23:49:23 +0000
committerMike Crute <mike@crute.us>2017-11-26 23:49:23 +0000
commitdfff68a50cab4a590d196b95cb7276aac484f6a7 (patch)
tree08b774f01ae7708d60178228ef3392c198a0a679
parentd62fe011cb964a85e7ff1da4f90547f4c6e3ba64 (diff)
downloaddockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.tar.bz2
dockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.tar.xz
dockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.zip
Convert bind to alpine
-rw-r--r--bind/Dockerfile18
-rw-r--r--bind/Makefile18
2 files changed, 18 insertions, 18 deletions
diff --git a/bind/Dockerfile b/bind/Dockerfile
index 58b4e21..62cc149 100644
--- a/bind/Dockerfile
+++ b/bind/Dockerfile
@@ -1,15 +1,7 @@
1FROM ubuntu:16.04 1FROM alpine:latest
2MAINTAINER Michael Crute <mike@crute.us> 2LABEL maintainer="Mike Crute <mike@crute.us>"
3 3
4RUN export DEBIAN_FRONTEND=noninteractive && \ 4RUN \
5 apt-get update && \ 5 apk add --no-cache bind
6 apt-get install -y curl software-properties-common bind9
7 6
8# Cleanup 7CMD [ "/usr/sbin/named", "-u", "named", "-4", "-g" ]
9 apt-get clean && \
10 rm -rf /var/lib/apt/lists/* && \
11 rm -rf /tmp/*
12
13EXPOSE 53/tcp 53/udp 953/tcp
14VOLUME ["/etc/bind", "/var/cache/bind"]
15CMD ["/usr/sbin/named", "-u", "bind", "-4", "-g"]
diff --git a/bind/Makefile b/bind/Makefile
index 5946bfe..d09a70b 100644
--- a/bind/Makefile
+++ b/bind/Makefile
@@ -1,14 +1,22 @@
1REPO=575365190010.dkr.ecr.us-west-2.amazonaws.com
2IMAGE=bind:latest-alpine
3
1all: 4all:
2 docker build -t bind . 5 docker build -t $(IMAGE) .
3 6
4all-no-cache: 7all-no-cache:
5 docker build --no-cache -t bind . 8 docker build --no-cache -t $(IMAGE) .
6 9
7run: 10run:
8 docker run -d --net=host \ 11 docker run -d --net=host \
9 -p 53:53/tcp \ 12 -p 53:53/tcp \
10 -p 53:53/udp \ 13 -p 53:53/udp \
11 -p 953:953 \ 14 -p 953:953 \
12 -v /srv/bind/etc:/etc/bind \ 15 -v /home/mcrute/tmp/bind/conf:/etc/bind \
13 -v /srv/bind/var:/var/cache/bind \ 16 -v /home/mcrute/tmp/bind/cache:/var/cache/bind \
14 bind 17 $(IMAGE)
18
19publish:
20 eval $$(aws ecr get-login --region us-west-2)
21 docker tag $(IMAGE) $(REPO)/$(IMAGE)
22 docker push $(REPO)/$(IMAGE)