I want to do something fairly simply in my Gitlab CI pipeline - I want to build the docker image and push it to an AWS ECR repo.
I've looked at this Gitlab CI guide and one of the suggestions it makes is using the docker:latest
image.
However, in order to access the AWS ECR repo - I'm also going to need to AWS commands - as from what I can see AWS only allows 12 hour tokens for accessing ECR repos.
I've searched docker hub and I can't find any public images that have both docker-in-docker and AWS cli. This is odd - because I imagine this is a very common solution.
Can someone suggest is there another standard way people build and push images to AWS ECR from Gitlab CI?