Getting Docker Running On AWS

This article begins with a high-level exploration of Docker. Then, a hello-world web application walk-through on your local machine. Finally, we end with an Amazon Web Service hosted Docker web application. It is the first in a four-part series of blog posts that touches various parts of the Docker ecosystem.

Exploration of Docker

Definition of Docker: an open-source program that enables a Linux application and its dependencies to be packaged as a container.

Docker has been receiving a lot of attention within the software community. With Docker Native Windows And Mac (currently beta), the popularity of Docker will only continue to grow.

Google has been spinning up billions of Docker containers a week for years. That is billions with a "B"!

Other unique organizations are also supporting Docker, like CERN, the particle and nuclear physics research institute outside Geneva, Switzerland. CERN is home to the Large Hadron Collider, the world’s largest and most powerful particle accelerator. Shipping out: How Docker could scale up massively.

Here is a well-written blog post that is an excellent reference: A Beginner Friendly Introduction to Containers VMs and Docker.

"The one big difference between containers and VMs is that containers share the host system’s kernel with other containers."

Let's Get Started Locally!

Now let's walk through the steps to get a deployed hello-world Docker web application to the internet.

1. Install Docker

Docker Installation on Windows. Then run the Docker Quickstart Terminal.
You can find similar Docker installations for Mac and Linux.

docker run hello-world

2. Pull and Test

In order to save time, I went on to Docker Hub to pull a Node.js hello-world web application.

docker run -d -p 3000:3000 asakaguchi/docker-nodejs-hello-world

If you wanted to create your own, I found a nice tutorial on Dockerizing a Node.js web app.

Now Deploy Globally!

1. Create a Docker Hub Account

It's pretty self-explanatory, but browse to Docker Hub and create an account.
This will let us use Docker Cloud.

2. Create a Docker Cloud Account

Browse to Docker Cloud and use your Docker Hub credentials to create an account.

3. Deploy a Docker Image

  • Link A Cloud Provider
  • Deploy a Node
    • Follow the steps from the Management Console to Deploy a Node.
  • Create a Service
    • Follow the steps from the Management Console to Create a Service.
    • Click: Public repositories -> Search Docker Hub
      • 'asakaguchi/docker-nodejs-hello-world'
    • Click Next, then Click Deploy.
  • Create a Stack
    • docker-node-js
    • web:
        image: "asakaguchi/docker-nodejs-hello-world:latest"
        ports:
          - "3000:3000"

4. Profit!

  • Let's view our running Docker application.
    • From the Docker Cloud Management Console
      • Stacks -> docker-node-js -> web -> web-1
      • Click the Docker Node icon node link icon.
      • Find the Docker IP Link icon IP link icon.
  • Using your link, navigate to: http://:3000

Get In Touch

We'd love to hear from you! Whether you have a question about our services, need a consultation, or just want to connect, our team is here to help. Reach out to us through the form, or contact us directly via social media.


Previous
Previous

Docker Hub Hello World

Next
Next

Definition of Done