2020-01-11 20:18:50 +00:00
|
|
|
# Extract graphviz and dependencies
|
2024-06-04 05:23:21 +00:00
|
|
|
FROM golang:1.22-bullseye AS deb_extractor
|
2020-01-11 20:18:50 +00:00
|
|
|
RUN cd /tmp && \
|
|
|
|
apt-get update && apt-get download \
|
|
|
|
graphviz libgvc6 libcgraph6 libltdl7 libxdot4 libcdt5 libpathplan4 libexpat1 zlib1g && \
|
|
|
|
mkdir /dpkg && \
|
|
|
|
for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done
|
|
|
|
|
2024-06-04 05:23:21 +00:00
|
|
|
FROM golang:1.22-bullseye AS builder
|
2022-09-27 00:15:49 +00:00
|
|
|
COPY . /go/src/pprofweb/
|
2020-06-02 18:59:11 +00:00
|
|
|
WORKDIR /go/src/pprofweb
|
2023-05-03 05:41:35 +00:00
|
|
|
RUN go build -o server ./webserver
|
2020-01-11 20:18:50 +00:00
|
|
|
|
2021-11-15 13:24:47 +00:00
|
|
|
FROM gcr.io/distroless/base-debian11:latest AS run
|
2022-09-27 00:15:49 +00:00
|
|
|
COPY --from=builder /go/src/pprofweb/server /pprofweb
|
2020-01-11 20:18:50 +00:00
|
|
|
COPY --from=deb_extractor /dpkg /
|
|
|
|
# Configure dot plugins
|
|
|
|
RUN ["dot", "-c"]
|
|
|
|
|
|
|
|
WORKDIR /
|
2022-09-27 00:15:49 +00:00
|
|
|
EXPOSE 7443
|
2020-01-11 20:18:50 +00:00
|
|
|
ENTRYPOINT ["/pprofweb"]
|