Skip to content

Commit

Permalink
[dev.boringcrypto] misc/boring: fix Docker Hub references
Browse files Browse the repository at this point in the history
Missed some references and it worked because I had old Docker images on
my local daemon.

Change-Id: Ia863bd10c44caf85905a721efce5b8926faf776e
Reviewed-on: https://go-review.googlesource.com/c/go/+/354789
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
heschi committed Oct 8, 2021
1 parent 7d26add commit 114aa69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions misc/boring/README.md
Expand Up @@ -24,8 +24,8 @@ at `gs://go-boringcrypto/`, making it available for download at
The script records each published release in the `RELEASES` file in this directory.

The `build.docker` script, which must be run after `build.release`, prepares a Docker image
and publishes it on hub.docker.com in the goboring organization.
`go1.8.3b1` is published as `goboring/golang:1.8.3b1`.
and publishes it on Google Artifact Registry.
`go1.17.2b7` is published as `us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:1.17.2b7`.

## Release process

Expand Down Expand Up @@ -56,8 +56,8 @@ To issue new BoringCrypto releases based on Go 1.X:

## Building from Docker

A Dockerfile that starts with `FROM golang:1.8.3` can switch
to `FROM goboring/golang:1.8.3b2` (see [goboring/golang on Docker Hub](https://hub.docker.com/r/goboring/golang/))
A Dockerfile that starts with `FROM golang:1.17.2` can switch
to `FROM us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:1.17.2b7`
and should need no other modifications.

## Building from Bazel
Expand Down
12 changes: 7 additions & 5 deletions misc/boring/build.docker
Expand Up @@ -39,9 +39,11 @@ fi
dversion=$(echo "$version" | sed 's/^go//')
sed "s!UUU!$url!; s/SSS/$sha256/; s/VVV/$dversion/" dockerfile.in >$dir/Dockerfile

docker build --pull -t us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:$dversion $dir
docker run goboring/golang:$dversion go version
docker run goboring/golang:$dversion go tool nm /usr/local/go/bin/go >$dir/nm
dpkg=us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:$dversion

docker build --pull -t $dpkg $dir
docker run $dpkg go version
docker run $dpkg go tool nm /usr/local/go/bin/go >$dir/nm
if ! grep crypto/internal/boring/sig.BoringCrypto $dir/nm >/dev/null; then
echo 'built docker image but did NOT find sig.BoringCrypto in go command!' >&2
exit 2
Expand All @@ -50,7 +52,7 @@ if egrep 'crypto/sha256\.\(\*digest\)' $dir/nm >/dev/null; then
echo 'built docker image but DID find sha256.(*digest) in go command unexpectedly!' >&2
exit 2
fi
docker push us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:$dversion
docker push $dpkg

echo
echo published as goboring/golang:$dversion
echo published as $dpkg

0 comments on commit 114aa69

Please sign in to comment.