Skip to content

Instantly share code, notes, and snippets.

@korenyoni
Last active March 20, 2023 13:58
Show Gist options
  • Save korenyoni/a5bd32da16a428477fce960060f192e9 to your computer and use it in GitHub Desktop.
Save korenyoni/a5bd32da16a428477fce960060f192e9 to your computer and use it in GitHub Desktop.
buildx to ECR
$ docker context create build
$ docker buildx create --use build --driver=docker-container
$ docker buildx build \
--cache-to type=gha,token=${{ secrets.GITHUB_TOKEN }} \
--cache-from type=gha,token=${{ secrets.GITHUB_TOKEN }} \
--platform=linux/amd64,linux/arm64 \
--build-arg TERRAGRUNT_VERSION=${{ env.TERRAGRUNT_VERSION }} \
--build-arg TERRAFORM_VERSION=${{ env.TERRAFORM_VERSION }} \
-t $REGISTRY/$REPOSITORY_AND_TAG \
-f container-images/$DOCKERFILE \
--push \
container-images
@korenyoni
Copy link
Author

Just a random example that came up on SweetOps office hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment