pprofweb/Dockerfile
a c22bdf9c97
Some checks failed
commit-tag / commit-tag-image (push) Failing after 5m42s
noot
2024-09-09 15:15:09 -05:00

24 lines
743 B
Docker

# Extract graphviz and dependencies
FROM golang:1.22-bullseye AS deb_extractor
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
FROM golang:1.22-bullseye AS builder
COPY . /go/src/pprofweb/
WORKDIR /go/src/pprofweb
RUN go build -o server ./pkg/webserver
FROM debian:12 AS run
RUN apt-get update && apt-get install -y graphviz libgvc6 libcgraph6 libltdl7 libxdot4 libcdt5 libpathplan4 libexpat1 zlib1g
COPY --from=builder /go/src/pprofweb/server /pprofweb
# Configure dot plugins
RUN ["dot", "-c"]
WORKDIR /
EXPOSE 7443
ENTRYPOINT ["/pprofweb"]