Commit 10d354b7 authored by Yong Tang's avatar Yong Tang Committed by GitHub

Add Dockerfile for automatic build in DockerHub (#796)

* Add Dockerfile for automatic build in DockerHub
Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Use build hooks to build docker images with SOURCE_BRANCH
Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent f5fbfce8
FROM alpine:latest
MAINTAINER Miek Gieben <miek@coredns.io> @miekg
# only need ca-certificates & openssl if want to use https_google
RUN apk --update add bind-tools ca-certificates openssl && update-ca-certificates && rm -rf /var/cache/apk/*
ARG COREDNS_VERSION=latest
RUN echo build coredns v$COREDNS_VERSION
ADD https://github.com/coredns/coredns/releases/download/v${COREDNS_VERSION}/coredns_${COREDNS_VERSION}_linux_x86_64.tgz /
RUN tar -xzf coredns_${COREDNS_VERSION}_linux_x86_64.tgz && rm coredns_${COREDNS_VERSION}_linux_x86_64.tgz
EXPOSE 53 53/udp
ENTRYPOINT ["/coredns"]
#!/bin/sh
set -x
docker build --build-arg COREDNS_VERSION=$SOURCE_BRANCH -t $IMAGE_NAME .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment