golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/gopherbot/Dockerfile (about) 1 # Copyright 2017 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 FROM golang:1.21-bookworm AS build 6 LABEL maintainer="golang-dev@googlegroups.com" 7 8 RUN mkdir /gocache 9 ENV GOCACHE /gocache 10 11 COPY go.mod /go/src/golang.org/x/build/go.mod 12 COPY go.sum /go/src/golang.org/x/build/go.sum 13 14 WORKDIR /go/src/golang.org/x/build 15 16 # Download module dependencies to improve speed of re-building the 17 # Docker image during minor code changes. 18 RUN go mod download 19 20 COPY . /go/src/golang.org/x/build/ 21 22 RUN go install golang.org/x/build/cmd/gopherbot 23 24 25 FROM debian:bookworm 26 LABEL maintainer="golang-dev@googlegroups.com" 27 28 # netbase and ca-certificates are needed for dialing TLS. 29 # The rest are useful for debugging if somebody needs to exec into the container. 30 RUN apt-get update && apt-get install -y \ 31 --no-install-recommends \ 32 netbase \ 33 ca-certificates \ 34 curl \ 35 strace \ 36 procps \ 37 lsof \ 38 psmisc \ 39 && rm -rf /var/lib/apt/lists/* 40 41 COPY --from=build /go/bin/gopherbot / 42 ENTRYPOINT ["/gopherbot"]