In my workflow, I am building an image and pushing it to local registry
- name: build and push to local registry
uses: docker/build-push-action@v3.3.0
with:
context: ${{ inputs.context }}
file: ${{ inputs.context }}/${{ inputs.dockerfile }}
no-cache: ${{ inputs.no_cache }}
build-args: ${{ inputs.build_args }}
push: true
tags: ${{ env.LOCAL_IMAGE }}
outputs: type=image,oci-mediatypes=false
I then use buildx
to copy the image to a GCR registry
- name: copy tagged image to sre gcr
if: inputs.image_build == true
shell: bash
run: |
docker buildx imagetools create \
--tag "${{ steps.set-images.outputs.base }}:${{ inputs.image_tag }}" \
${{ env.LOCAL_IMAGE }}
Instead of having one image created, I get this:
My workflow uses the local registry service for the initial build of a localhost
image that is later copied to various gcr
registries through the docker buildx imagetools create
command.
services:
registry:
image: registry:2
ports:
- 5000:5000
Why is this happening?