diff options
author | Mike Crute <mike@crute.us> | 2017-11-26 23:49:23 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2017-11-26 23:49:23 +0000 |
commit | dfff68a50cab4a590d196b95cb7276aac484f6a7 (patch) | |
tree | 08b774f01ae7708d60178228ef3392c198a0a679 | |
parent | d62fe011cb964a85e7ff1da4f90547f4c6e3ba64 (diff) | |
download | dockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.tar.bz2 dockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.tar.xz dockerfiles-dfff68a50cab4a590d196b95cb7276aac484f6a7.zip |
Convert bind to alpine
-rw-r--r-- | bind/Dockerfile | 18 | ||||
-rw-r--r-- | bind/Makefile | 18 |
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 @@ | |||
1 | FROM ubuntu:16.04 | 1 | FROM alpine:latest |
2 | MAINTAINER Michael Crute <mike@crute.us> | 2 | LABEL maintainer="Mike Crute <mike@crute.us>" |
3 | 3 | ||
4 | RUN export DEBIAN_FRONTEND=noninteractive && \ | 4 | RUN \ |
5 | apt-get update && \ | 5 | apk add --no-cache bind |
6 | apt-get install -y curl software-properties-common bind9 | ||
7 | 6 | ||
8 | # Cleanup | 7 | CMD [ "/usr/sbin/named", "-u", "named", "-4", "-g" ] |
9 | apt-get clean && \ | ||
10 | rm -rf /var/lib/apt/lists/* && \ | ||
11 | rm -rf /tmp/* | ||
12 | |||
13 | EXPOSE 53/tcp 53/udp 953/tcp | ||
14 | VOLUME ["/etc/bind", "/var/cache/bind"] | ||
15 | CMD ["/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 @@ | |||
1 | REPO=575365190010.dkr.ecr.us-west-2.amazonaws.com | ||
2 | IMAGE=bind:latest-alpine | ||
3 | |||
1 | all: | 4 | all: |
2 | docker build -t bind . | 5 | docker build -t $(IMAGE) . |
3 | 6 | ||
4 | all-no-cache: | 7 | all-no-cache: |
5 | docker build --no-cache -t bind . | 8 | docker build --no-cache -t $(IMAGE) . |
6 | 9 | ||
7 | run: | 10 | run: |
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 | |||
19 | publish: | ||
20 | eval $$(aws ecr get-login --region us-west-2) | ||
21 | docker tag $(IMAGE) $(REPO)/$(IMAGE) | ||
22 | docker push $(REPO)/$(IMAGE) | ||