push-to-registry icon indicating copy to clipboard operation
push-to-registry copied to clipboard

[FIX] Don't add docker.io prefix to ECR images

Open der-eismann opened this issue 2 years ago • 2 comments

Description

The action assumes that if image.split("/").length == 2, the image must be from Docker hub instead of e.g. quay.io, where the value would be 3 (for example for quay.io/foreman/foreman:3.2-stable). But for AWS ECR (e.g. 123456789101.dkr.ecr.eu-west-1.amazonaws.com/example-project:master) the value is also 2, so it adds the prefix even though it is not needed which breaks the action.

Related Issue(s)

#68

Checklist

  • [ ] This PR includes a documentation change
  • [X] This PR does not need a documentation change

  • [ ] This PR includes test changes
  • [ ] This PR's changes are already tested

  • [ ] This change is not user-facing
  • [X] This change is a patch change
  • [ ] This change is a minor change
  • [ ] This change is a major (breaking) change

Changes made

  • Don't add docker.io prefix to ECR images pulled from Docker daemon

der-eismann avatar Aug 08 '22 16:08 der-eismann

I can confirm that this branch fixes our problems with the breaking builds. It would still be nice to disable the docker stuff altogether, but this is more important now.

der-eismann avatar Aug 08 '22 16:08 der-eismann

@divyansh42 Can you provide any feedback on this PR?

der-eismann avatar Aug 16 '22 14:08 der-eismann

@divyansh42 can you please get this in as well?

der-eismann avatar Feb 15 '23 12:02 der-eismann

@der-eismann could you please force push again? So that we can run the checks.

divyansh42 avatar Feb 15 '23 12:02 divyansh42

I think you need to approve the workflows first before they run

der-eismann avatar Feb 15 '23 12:02 der-eismann

I think you need to approve the workflows first before they run

For some reason, earlier I was not able to see that option. Now it is there. approved the workflow run.

divyansh42 avatar Feb 15 '23 12:02 divyansh42

Thank you for merging!

der-eismann avatar Feb 15 '23 12:02 der-eismann

@der-eismann I have updated the tags, changes should reflect in v2, v2.7 and v2.7.1

divyansh42 avatar Feb 15 '23 12:02 divyansh42