We are going to make containerized official open
source 2048 on our Docker host live.
And to do so, the first step is, get the files. We will clone
this Git repo on our home directory. If you don't
have Git installed, please go through previous article.
Once the repo is cloned, let's navigate
into it and get the list of files. We have a bunch
of files including index.html, which we will
be using soon enough. Now run a container called
2048 from nginx:latest image and use bind-mount
to mount our clone 2048 directory to html
directory of nginx image. In other words, we are
replacing the index.html file and providing
the necessary support for the new index.html.
As always, we are exposing containers port 80
to host's port 8080, the container is up and running.
Now let's open a web browser and navigate to
localhost port 8080, There we go,
we have our favorite 2048 on our web browser and that too
containerized. Let's see if it works properly.
[Background Music]
It does, and it was an awesome experience.
Go ahead, try it yourself.