This repository contains all the files required to a simple snake game in a docker container.
This is a snake game which can be accessed using a web browser. It's made up of a css, js, and an index.html file.
Make sure the Docker service is up and running on your local machine or your Cloud instance. Build an image based on the dockerfile present in the master folder.
-t is used to name the image. Here the name is "snake-game".
Start a container using an image that's recently created.
. tells the command to look for the dockerfile in this location. port 80 has been used on the host and also on the container for the app to run. Change the host port to any other port as per your requirement.
Once the container is up and running, open a web browser and type in either container_ip/index.html or localhost/index.html and check the results. Click on the start button to start the snake game.