The workaround is --network host. However that seems like it shouldn't be necessary as wget -O - http://instance-data/latest/meta-data/iam/security-credentials/ec2-ecr-role correctly returns values even without --network host, and if you feed those values back in via env variables to the same docker image then amazonka will successfully authenticate even without --network host, so in principle it seems like it should be feasible to tie it all together within amazonka.