Remove external Docker container registry dependencies / only store container images on Amazon ECR

Solution 1:

If you push an image to ECR you are no longer relying on the "first layer" of your dockerfile for the image you built. If you have a Dockerfile that has a FROM that points to mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2016 and you build an image off of this Dockerfile, you can push to ECR and you are no longer dependent on the mcr.

I am wondering if you are somehow still pulling from mcr in your docker pull syntax?

Your pull should have have a syntax along the lines of docker pull aws_account_id.dkr.ecr.us-west-2.amazonaws.com/my_image:my_tag and such a command won't depend on mcr