Skip to content

Commit 8f214a8

Browse files
authored
Refactor Dockerfile according to best practices (#4)
* Refactor Dockerfile according to best practices * Bump bind9 and dnsutils version to deb9u6 #patch
1 parent 276c15e commit 8f214a8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
FROM golang:latest as builder
1+
FROM golang:1.14.1 as builder
22
RUN mkdir /build
3-
ADD api/* /build/
3+
COPY api/* /build/
44
WORKDIR /build
55
RUN go get -d -v ./
66
RUN go build -o dyndns-api .
77

88
FROM debian:stretch
99
ARG DEBIAN_FRONTEND=noninteractive
10-
RUN apt update -qq && \
11-
apt install -q -y bind9 dnsutils -qq && \
12-
apt-get clean
10+
RUN apt-get update -qq && \
11+
apt-get install -q -y bind9=1:9.10.3.dfsg.P4-12.3+deb9u6 dnsutils=1:9.10.3.dfsg.P4-12.3+deb9u6 -qq --no-install-recommends && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
1314

1415
COPY --from=builder /build/dyndns-api /root/
1516
COPY ./setup.sh /root/setup.sh
1617
RUN chmod +x /root/setup.sh
1718

1819
EXPOSE 53 8080
19-
ENTRYPOINT ["/root/setup.sh"]
20+
ENTRYPOINT ["/root/setup.sh"]

0 commit comments

Comments
 (0)