golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/pubsubhelper/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 # Optimization for iterative docker build speed, not necessary for correctness: 17 # TODO: write a tool to make writing Go module-friendly Dockerfiles easier. 18 RUN go install cloud.google.com/go/compute/metadata 19 RUN go install github.com/bradfitz/go-smtpd/smtpd 20 RUN go install github.com/jellevandenhooff/dkim 21 RUN go install go4.org/types 22 RUN go install golang.org/x/crypto/acme/autocert 23 24 COPY . /go/src/golang.org/x/build/ 25 26 # Install binary to /go/bin: 27 RUN go install golang.org/x/build/cmd/pubsubhelper 28 29 FROM debian:bookworm 30 LABEL maintainer="golang-dev@googlegroups.com" 31 32 # netbase and ca-certificates are needed for dialing TLS. 33 # The rest are useful for debugging if somebody needs to exec into the container. 34 RUN apt-get update && apt-get install -y \ 35 --no-install-recommends \ 36 netbase \ 37 ca-certificates \ 38 curl \ 39 strace \ 40 procps \ 41 lsof \ 42 psmisc \ 43 && rm -rf /var/lib/apt/lists/* 44 45 COPY --from=build /go/bin/pubsubhelper / 46 ENTRYPOINT ["/pubsubhelper"]