Skip to content

Commit 3ef5346

Browse files
committed
devapp: update Dockerfile and README
Start using the latest stable version of Go and Debian, fix LABEL syntax, replace brittle docker build speed optimization (see past CLs like CL 360838, CL 349091 for more detailed motivation). Update deployment instructions in README.md. We use the 'services' cluster in the us-central1 region now. Updates golang/go#48408. Change-Id: I0901c4f62dfbe37ad78f0ba6928b3eb0eefc4e3a Reviewed-on: https://go-review.googlesource.com/c/build/+/383814 Trust: Dmitri Shuralyov <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent 3bee051 commit 3ef5346

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

devapp/Dockerfile

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
# Use of this source code is governed by a BSD-style
33
# license that can be found in the LICENSE file.
44

5-
FROM golang:1.13 AS builder
6-
LABEL maintainer "[email protected]"
7-
8-
ENV GO111MODULE=on
5+
FROM golang:1.17 AS builder
6+
LABEL maintainer="[email protected]"
97

108
RUN mkdir /gocache
119
ENV GOCACHE /gocache
@@ -15,24 +13,16 @@ COPY go.sum /go/src/golang.org/x/build/go.sum
1513

1614
WORKDIR /go/src/golang.org/x/build
1715

18-
# Optimization for iterative docker build speed, not necessary for correctness:
19-
# TODO: write a tool to make writing Go module-friendly Dockerfiles easier (golang.org/issue/34192)
20-
RUN go install cloud.google.com/go/storage
21-
RUN go install golang.org/x/net/http2
22-
RUN go install golang.org/x/crypto/acme/autocert
23-
COPY cmd/pubsubhelper/pubsubtypes /go/src/golang.org/x/build/cmd/pubsubhelper/pubsubtypes
24-
RUN go install golang.org/x/build/cmd/pubsubhelper/pubsubtypes
25-
COPY autocertcache /go/src/golang.org/x/build/autocertcache
26-
RUN go install golang.org/x/build/autocertcache
27-
COPY internal /go/src/golang.org/x/build/internal
28-
COPY maintner /go/src/golang.org/x/build/maintner
29-
RUN go install golang.org/x/build/maintner/godata
16+
# Download module dependencies to improve speed of re-building the
17+
# Docker image during minor code changes.
18+
RUN go mod download
3019

3120
COPY . /go/src/golang.org/x/build/
3221
# Install binary to /go/bin:
3322
RUN go install golang.org/x/build/devapp
3423

35-
FROM debian:stretch
24+
FROM debian:bullseye
25+
LABEL maintainer="[email protected]"
3626

3727
# netbase and ca-certificates are needed for dialing TLS.
3828
# The rest are useful for debugging if somebody needs to exec into the container.

devapp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $ make deploy-staging
5252

5353
```sh
5454
$ gcloud config set project symbolic-datum-552
55-
$ gcloud container clusters get-credentials --zone=us-central1-f go
55+
$ gcloud container clusters get-credentials --zone=us-central1 services
5656
$ make push-prod
5757
```
5858

0 commit comments

Comments
 (0)