user605331
user605331

Reputation: 3788

How to deploy a Docker container on EC2 ECS from Docker Hub private repo?

I have an image in a private Docker Hub repository, which I'm trying to deploy on Amazon's Elastic Container Service. There seems to be nice web console to run a container from a public repository, but nothing for private. I've read and tried to understand the documentation for this, but I don't understand what that has to do with deploying my container, as it states "The Amazon ECS container agent allows container instances to connect to your cluster".

As an alternative to using the web console, I see mentions of setting up a task definition. It sounds like that's the manual version of what the web console does. I suspect my best bet is with this method, possibly with the help of the script here.

What is the simplest way for me to run an existing image on ECS that's hosted in a private repository?

Upvotes: 3

Views: 1330

Answers (1)

John with waffle
John with waffle

Reputation: 4141

Right, so a container instance is just the EC2 machine that happens to run the services defined in the cluster. The cluster can then connect to the EC2 machine as a container instance, but unless the EC2 machine is appropriately configured, it can't run your private repository.

Upvotes: 1

Related Questions