golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/securitybot/Dockerfile (about) 1 # Copyright 2022 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 marketplace.gcr.io/google/debian11:latest 6 7 RUN apt-get update && apt-get install -y \ 8 --no-install-recommends \ 9 wget 10 11 RUN set -eux; \ 12 url='https://dl.google.com/go/go1.19.2.linux-amd64.tar.gz'; \ 13 sha256='5e8c5a74fe6470dd7e055a461acda8bb4050ead8c2df70f227e3ff7d8eb7eeb6'; \ 14 \ 15 wget -O go.tgz "$url" --progress=dot:giga; \ 16 echo "$sha256 *go.tgz" | sha256sum -c -; \ 17 \ 18 tar -C /usr/local -xzf go.tgz; \ 19 rm go.tgz 20 21 ENV GOPATH /go 22 RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 23 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH 24 25 COPY go.mod /app/go.mod 26 COPY go.sum /app/go.sum 27 28 WORKDIR /app 29 30 RUN go mod download 31 32 COPY . /app 33 34 RUN go build golang.org/x/build/cmd/securitybot 35 36 RUN apt-get update && apt-get install -y \ 37 --no-install-recommends \ 38 tini 39 40 ARG PORT=8080 41 ENV PORT=${PORT} 42 EXPOSE ${PORT} 43 44 WORKDIR /app 45 ENTRYPOINT ["/usr/bin/tini", "--", "./securitybot", "-gcs=stb-logs"]