-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (21 loc) · 800 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM golang:1.23-bookworm AS build-stage
LABEL org.opencontainers.image.source="https://github.com/thz/probe"
LABEL org.opencontainers.image.description="thz/probe a DNS,TCP,TLS prober"
LABEL org.opencontainers.image.licenses="Apache-2.0"
ADD . /go/src/github.com/thz/probe
WORKDIR /go/src/github.com/thz/probe
ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" env CGO_ENABLED=1 go build -o probe ./cmd
FROM debian:bookworm-slim AS run-stage
# make the container slightly more useful for diagostics
RUN apt-get update && apt-get install -qq -y \
inetutils-telnet \
iproute2 \
iptables \
iputils-ping \
ldnsutils \
openssl \
socat \
tcpdump
COPY --from=build-stage /go/src/github.com/thz/probe/probe /usr/bin/probe
ENTRYPOINT [ "/usr/bin/probe" ]