Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docker-build) introdue multi-platform build for docker-gcloud-p… #348

Conversation

sschulzdialpad
Copy link

@sschulzdialpad sschulzdialpad commented Apr 2, 2022

…ubsub-emulator

used following command to test it locally:

docker buildx build --platform linux/amd64,linux/arm64 -t seb-test:latest .

It took 4m 56s to build both architecture versions locally on my machine :)

Todo:

  • integration test the build image locally

Copy link
Owner

@TheKevJames TheKevJames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this need some CI changes as well to this job since we're not passing in the --platform arg? It'd be awesome if the existing CI job could produce images for both platforms!

"linux/amd64") gcloud_arch=x86_64 ;; \
"linux/arm64") gcloud_arch=ARM ;; \
esac \
&& curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-378.0.0-linux-${gcloud_arch}.tar.gz \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So unfortunately specifying the gcloud version here breaks the guarantee of this image (https://github.com/TheKevJames/tools/tree/master/docker-gcloud-pubsub-emulator#gcloud-pubsub-emulator) which is that we want to auto-build a new image whenever the gcloud sdk gets updated (which is currently done via dockerhub triggers -- since google/cloud-sdk is the base image, dockerhub can be set to autobuild whenever that gets pushed.

We'll need to think of some way to have the same behaviour now that we're building the sdk manually. Two approaches which I could think might work would be:

  • always install the latest version and setup a CI job to run on a, say, daily basis which pushes the :latest tag, or
  • (preferred, but maybe harder?) move the gcloud sdk version tag to some location where Renovate (which is already enabled for this repo) can update it, then rely on the existing CI jobs / docker pushes to handle things.

@TheKevJames
Copy link
Owner

Closing and tracking here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants