blob: ab2ca23eb542f9fa4333590769988e17fae03413 [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.18 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:bullseye
# 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"]