mirror of
https://github.com/coredns/coredns.git
synced 2025-11-19 10:22:17 -05:00
Add Dockerfile for automatic build in DockerHub (#796)
* Add Dockerfile for automatic build in DockerHub Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Use build hooks to build docker images with SOURCE_BRANCH Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
16
docker/Dockerfile
Normal file
16
docker/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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"]
|
||||||
3
docker/hooks/build
Executable file
3
docker/hooks/build
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
docker build --build-arg COREDNS_VERSION=$SOURCE_BRANCH -t $IMAGE_NAME .
|
||||||
Reference in New Issue
Block a user