Getting Started with EC2 Container Registry

This is giving me a headache.

Here’s what I’ve done so far

  • how to provide environment variables to AWS ECS task definition?
  • Docker - Cant access docker port from outside
  • Nginx proxy on Elastic Beanstalk EC2 instance times out
  • How to use t2.nano ec2 instances in an Amazon ec2 container cluster?
  • botocore.exceptions.EndpointConnectionError from inside Mac Docker container
  • Running a Docker container on AWS Elastic Beanstalk - 502 Bad Gateway nginx/1.6.2
    • Created an EC2 Virtual Server Instance, and its running
    • Installed the AWS CLI
    • Installed Docker on my EC2 Virtual Server after I SSH’d into it

    So looking at the docs it tells you how to build an image. Now comes my confusion.

    Question 1: So am I right by assuming that one basically have an option to a) build an image off your host or b) pull an image created by others from Docker Hub?

    Question 2: If I’m right about Question #1 then what am I building an image ** off of** if I am not pulling one from docker hub? with the AWS docs here?

    Question 3: then I see a whole different route I can take, using Docker Compose, so I’d use that instead of all this above? This is so confusing.

    EC2 Container Registry – Now Generally Available

    So again, here, it tells you to install docker on the Host. Then immediately jumps into “create an image”. Create an image off what, that host’s OS? I don’t get it, I guess that’s what it means OR I can pull an image from Docker Hub and not go this route?

    Same here, it’s talking about creating a docker image, what off the Host?

    Or..maybe I’m not understanding what “image” means but I assume going this route, instead of pulling a Docker image from Docker Hub that I’m creating an image off my EC2 virtual Instance?

  • Docker container connect to MySQL database locally -> redirect to another container
  • Docker volume stops syncing
  • can't npm install bcrypt in my docker image
  • is it considered bad practice to create ssh key in container?
  • Run docker inside a docker container?
  • Using host machines CA cert within Docker container
  • One Solution collect form web for “Getting Started with EC2 Container Registry”

    A1: No. You can’t build an image off your host.
    You can create an new image according to your requirement like which Operating Sytem (Ubuntu, Fedora), Stack(LAMP, LEMP) and many other things.
    Or you can pull an image which will be pre-configured with all the packages like WordPress Stack image, Magento stack image, Bitnami image which you can pull from docker-hub.

    A2: As I have mentioned earlier you can build an image of any operating system you want(Ubuntu, Fedora, Debian) but not off the host.
    You just need to pull image from docker-hub. e.g docker pull ubuntu will pull mininmal image of Ubuntu-14.04. And if you need specific version of Ubuntu
    like Ubuntu-12.04 version e.g docker pull ubuntu:12.04 will pull minimal image of Ubuntu-12.04

    A3: Docker-compose is a tool for defining and running multi-container docker applications. docker-compose conatins a compose file
    in which you can configure your application services.

    And finally Amazon EC2 Container Registry is little bit different thing. The Idea is the same as docker but Amazon is providing
    this as a EC2 Container Service with many other functionality which docker doesn’t have right now.

    Hope it hepls:-)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.