File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM public.ecr.aws/docker/library/golang:1.20-bullseye as build
1
+ FROM public.ecr.aws/ubuntu/ubuntu:jammy as build-unbound
2
+
3
+ RUN apt-get update -qq && \
4
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git git-buildpackage
5
+
6
+ WORKDIR /build/unbound
7
+ RUN git clone --no-single-branch -b debian/1.17.1-2 --filter=tree:0 https://salsa.debian.org/dns-team/unbound.git .
8
+ RUN apt-get build-dep -y .
9
+ RUN gbp buildpackage -b -uc -us -j"$(nproc)" --git-ignore-branch --git-no-pristine-tar
10
+
11
+ # ##
12
+
13
+ FROM public.ecr.aws/docker/library/golang:1.20-bullseye as build-exporter
2
14
3
15
RUN go install github.com/hanazuki/unbound_exporter@679dfa54debd24456ed458a7e72590101b560e2b
4
16
5
17
# ##
6
18
7
19
FROM public.ecr.aws/ubuntu/ubuntu:jammy
8
20
9
- RUN apt-get update -qq && \
10
- DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends unbound dns-root-data dumb-init
21
+ RUN --mount=type=bind,from=build-unbound,src=/build,dst=/build \
22
+ apt-get update -qq && \
23
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends /build/unbound_*.deb dns-root-data dumb-init && \
24
+ rm -rf /var/lib/apt/lists/*
11
25
12
- COPY --from=build /go/bin/unbound_exporter /usr/local/bin/
26
+ COPY --from=build-exporter /go/bin/unbound_exporter /usr/local/bin/
13
27
14
- RUN /usr/lib/unbound/package-helper root_trust_anchor_update
15
- RUN rm /etc/unbound/unbound_*.key /etc/unbound/unbound_*.pem
28
+ RUN /usr/libexec/unbound-helper root_trust_anchor_update
16
29
17
30
COPY entrypoint.sh /
18
31
RUN chmod +x entrypoint.sh
You can’t perform that action at this time.
0 commit comments