# Day 17 Task: Docker Project for DevOps Engineers.

**DockerFile:**

Docker is a tool that makes it easy to run applications in containers. Containers are like small packages that hold everything an application needs to run. To create these containers, developers use something called a Dockerfile.

A Dockerfile is like a set of instructions for making a container. It tells Docker what base image to use, what commands to run, and what files to include. For example, if you were making a container for a website, the Dockerfile might tell Docker to use an official web server image, copy the files for your website into the container, and start the web server when the container starts.

Task:

* Create a Dockerfile for a simple web application (e.g. a Node.js or Python app)
    
    First, we need to clone it from the GitHub
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682845873173/4e15706b-90ec-4343-9477-5ad274ec923c.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682845804501/c3da294c-3114-4d0b-ab2a-79dbdab80a3a.png align="center")
    
* Build the image using the Dockerfile and run the container
    
    For Building an image you need to write the file first.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682848482003/508ae545-e504-4c60-b125-0c36e4cebe8a.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682848504729/f5a2c0d6-db4f-4736-b01c-0190d31e53e1.png align="center")
    
    Now, you need to convert it to the file to the image
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682848662991/f7123310-366b-4180-b35d-c1bf3dcf74f4.png align="center")
    
* Now, image to a container
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682848777152/848f2368-53e7-490a-83fa-45622dd122d3.png align="center")
    
* Verify that the application is working as expected by accessing it in a web browser
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682856722543/2adbd09f-245e-46f6-bd68-a5eae4f45e88.png align="center")
    
* Push the image to a public or private repository (e.g. Docker Hub )
    
    **Steps to push**
    
    1. Login to the docker
        
    2. docker image tag \[Local Image Name: TAG\] \[REPOS\_NAME: TAG\]
        
    3. docker image push \[REPOS\_NAME:TAG\]
        

Happy Learning:)

Mohammed Muqafamuddin
