blob: 875dd6d0d2401b8850148e3f5c9e6c1b8d3a4e0c [file] [log] [blame]
# Copyright 2022 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
FROM golang:1.21-bookworm AS builder
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY . /app
RUN go build -o perf
FROM debian:bookworm
# netbase and ca-certificates are needed for dialing TLS.
RUN apt-get update && apt-get install -y \
--no-install-recommends \
netbase \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/perf /
ENTRYPOINT ["/perf"]