We use the Docker registry inside our VPC VPC, which is not accessible from the outside. We want to be able to run tasks in ECS from this registry, however we see that the service works only in the PENDING state, because the Docker daemon cannot access the registry.
I found a kind of workaround by modifying the user-specific startup configuration data, but it doesn't seem to me that I am doing this in the best way:
#!/bin/bash echo ECS_CLUSTER=MY_CLUSTER_NAME >> /etc/ecs/ecs.config echo OPTIONS=--insecure-registry=insecure.registry.hostname:5000 > /etc/sysconfig/docker service docker restart docker start ecs-agent
This works fine, and I see that my task is working as expected. I just don't think that this is by far the best way to do this.
AWS pointed me to this article , which discusses authentication with private registries, but I'm not looking for authentication, just for Docker to ignore the fact that I'm using an insecure (i.e. not HTTPS) registry.
Does anyone have a better solution?
thanks
source share