File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
- ARG GOVERSION=1.12
1
+ ARG GOVERSION=1.14
2
2
3
3
FROM golang:${GOVERSION}-buster
4
4
5
5
# All args after each FROM command are no longer available.
6
6
ARG COREDNSVERSION=v1.6.4
7
+ ARG TENSORFLOWVERSION=1.15.0
7
8
8
9
RUN apt-get update && apt-get -uy upgrade
9
10
RUN apt-get -y install ca-certificates && update-ca-certificates
10
11
11
12
ENV COREDNSPATH github.com/coredns/coredns
12
13
ENV DNSTUNPATH github.com/netrack/dnstun
14
+ ENV TENSORFLOWPATH storage.googleapis.com/tensorflow/libtensorflow
13
15
ENV GO111MODULE on
14
- ENV CGO_ENABLED 0
15
16
16
17
RUN curl -fsSL https://${COREDNSPATH}/archive/${COREDNSVERSION}.tar.gz -o coredns.tar.gz \
17
18
&& mkdir -p coredns \
18
19
&& tar -xzf coredns.tar.gz --strip-components=1 -C coredns \
19
20
&& rm -rf coredns.tar.gz
20
21
22
+
23
+ RUN curl -fsSL https://${TENSORFLOWPATH}/libtensorflow-cpu-linux-x86_64-${TENSORFLOWVERSION}.tar.gz -o tensorflow.tar.gz \
24
+ && tar -xzf tensorflow.tar.gz -C /usr/ \
25
+ && rm -rf tensorflow.tar.gz \
26
+ && ldconfig
27
+
21
28
COPY . ${GOPATH}/src/${DNSTUNPATH}
22
29
COPY plugin.cfg coredns/plugin.cfg
23
30
@@ -29,8 +36,9 @@ RUN go mod edit -replace ${DNSTUNPATH}@v0.0.0=${GOPATH}/src/${DNSTUNPATH}
29
36
RUN go generate && go build -o /bin/coredns
30
37
31
38
32
- FROM scratch
39
+ FROM debian:buster-slim
33
40
COPY --from=0 /etc/ssl/certs /etc/ssl/certs
41
+ COPY --from=0 /usr/lib/libtensorflow* /usr/lib/
34
42
COPY --from=0 /bin/coredns /bin/coredns
35
43
COPY Corefile /etc/coredns/Corefile
36
44
VOLUME /etc/coredns
You can’t perform that action at this time.
0 commit comments