Mario Game in Docker

ยท

3 min read

In this project we are going to look in docker how to install and run a Mario game in it. But at the first we are going to look what is docker ??

What is Docker ??

Docker is an open platform for developing, shipping, and running applications. It allows you to package your application and its dependencies into a standardized unit called a container. This container can then be deployed to any environment, whether it's a local development machine, a staging server, or a production environment.

Image of Docker logo

Benefits of using Docker:

  • Portability: Docker containers are portable and can run on any system that has the Docker Engine installed. This makes it easy to share and deploy your applications across different environments.

  • Isolation: Docker containers are isolated from the host system and each other. This means that a problem in one container won't affect other containers or the host system.

  • Reproducibility: Docker containers are built from Docker images, which are static and immutable. This means that you can always recreate the same environment, no matter where you are or what system you're using.

  • Scalability: Docker containers are lightweight and can be started and stopped quickly. This makes it easy to scale your applications up or down.

Components of Docker:

  • Docker Engine: The Docker Engine is the software that builds, runs, and manages Docker containers. It is available for Windows, macOS, and Linux.

  • Docker Hub: Docker Hub is a public registry where you can find and share Docker images. There are over 10 million images available on Docker Hub, which includes images for popular languages, frameworks, and applications.

  • Docker Compose: Docker Compose is a tool that allows you to define and run multi-container applications. With Docker Compose, you can define all of the services that make up your application in a single YAML file.


Let's see demo

At the first create a AWS ec2-instance and launch it

You can see we successfully created a ec2-instance , copy public IP address of instance in IDE or any SSH tools. (I my using VScode for launching ec2-instance).

At the first install docker by using

yum install docker

Run the docker in instance by using

systemctl start docker

Check docker is running or not by using

systemctl status docker

Pull the docker image from docker hub

docker pull nehal71/mario:latest

we completed our work just we need to run image in our instance by using

just copy IP address of Instance and paste it in browser!!

In this project the docker image is taken from profile

kaminskypavel/mario

That's all for this blog and stay tuned for more amazing project and more such tech.

Thank you for Reading:)

#Happy Reading!!

Any query and suggestion are always welcome - Nehal Ingole

ย