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

Pull docker image used for qemu binfmt in packer #1139

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

triarius
Copy link
Contributor

We use a method documented by docker to install some tools necessary for building (and running) multiarch docker images. See https://docs.docker.com/build/building/multi-platform/

Previously we did this entirely in the startup script packer/linux/scripts/install-docker.sh. However, as was revealed in dogfooding, launching many instances at the same time could cause the startup script to fail due to docker hub rate limits. Instead, we can pull the image when the AMI is being built by packer, and then run the installation in the startup script.

Why not pull and run when building the AMI? Running multiarch images in CI failed when I tried to do that: https://buildkite.com/buildkite-aws-stack/buildkite-aws-stack/builds/3275

@triarius triarius changed the base branch from master to v6 June 20, 2023 10:44
@triarius triarius marked this pull request as ready for review June 20, 2023 10:44
# See https://docs.docker.com/build/building/multi-platform/
QEMU_BINFMT_VERSION=7.0.0-28
sudo mkdir -p /usr/local/lib
echo "QEMU_BINFMT_VERSION=${QEMU_BINFMT_VERSION}" | sudo tee -a /usr/local/lib/bk-install-elastic-stack.sh
Copy link
Contributor Author

@triarius triarius Jun 20, 2023

Choose a reason for hiding this comment

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

We do this so that the version that is pulled is later run.

@triarius triarius force-pushed the pdp-1146-pull-docker-images-in-packer-instead-of-startup branch from be95146 to 71f79a0 Compare June 20, 2023 22:56
@triarius triarius requested a review from a team June 20, 2023 22:59
@triarius triarius merged commit fa918b9 into v6 Jun 21, 2023
1 check passed
@triarius triarius deleted the pdp-1146-pull-docker-images-in-packer-instead-of-startup branch June 21, 2023 00:26
@triarius triarius mentioned this pull request Jun 21, 2023
Merged
triarius added a commit that referenced this pull request Jun 26, 2023
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.

None yet

1 participant