DevOps Project — Create a Game using Docker and Deploy to AWS BeanStalk

Ghazanfar Ali
3 min readSep 30, 2023

--

Introduction:

In this project we will be creating a game using docker container and deploy on AWS, The learning objectives will be:

  • How to create docker file, images, container
  • How to deploy a containerized application on AWS.

We will be using the game “2048” on github:

https://github.com/gabrielecirulli/2048

By using this we will create a docker container then use the AWS service elastic beanstalk to deploy this docker container on AWS.

Lets start the project:

First we will create a directory in our local system:

In this folder we will create our docker file:

Our docker file is ready now test if application is running as desired:

Now we will build an image from this docker file:

It have created an image for us:

Now we will create container from this image:

We have deployed the game in docker container but on our local system, until now we can only access to this game:

Now we will move this on AWS cloud using Elastic Beanstalk:

Name your application:

Choose platform as docker:

Upload docker file:

Select the service role:

AWS Beanstalk will manage all the infrastructure for us i.e instances, load balancer etc all the services we just have to upload our application code.

Our environment is also ready now click on the link to access our game:

Our give is also deployed on cloud:

Now we will map this address to our purchased go daddy domain name:

Now our game is accessible on internet with our purchased domain name:

Thats all in this project!

--

--

Ghazanfar Ali
Ghazanfar Ali

Written by Ghazanfar Ali

I write technical blogs on DevOps and AWS, Azure and GCP

No responses yet