Skip to main content

Command Palette

Search for a command to run...

Day 17 Docker Project for DevOps Engineers [Django app using docker]

#devops

Updated
2 min read
Day 17  Docker Project for DevOps Engineers [Django app using docker]
M

An professional with 5+ years of experience in devops and good knowledge of Automation Testing Python Programming Language and HTML,CSS. DevOps Tools : Jenkins,Docker,Git,artifatory,Sonar,ansible, monitoring tools like grafana and Prometheus. Proficient in understanding the requirements specification, analysing the existing process and writing automation scripts using Python, Experience in Agile Methodology,Scrum. Good knowledge on Test Development Life Cycle (SDLC). Well acquainted with Atlassian Support tools (Jira, confluence, bitbucket, Artifactory), also hands of experience on jira data migration and upgradation Hands on experience on Linux (CentOS) ,Linux administrator. Good knowledge about AWS cloud computing,SQL

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

first, clone the application in your aws server

Write dockerfile as below:

Provide permission to docker user using the below command

  • sudo usermod -aG docker $USER

Build the docker image:

Run the docker image and create the container:

Open the security group in AWS with edit inbound rules:

  • Verify that the application is working as expected by accessing it in a web browser

  • Push the image to a public or private repository (e.g. Docker Hub )

    login to docker hub create account >> on server use command docker login

      docker login
      docker ps
      docker tag django-todo-cicd_django_todo_app madhurip16/django-todo-app:latest
    
      docker images
      docker image push <image-name>
    

Thank you for reading this Blog. Hope you learned something new today! If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future😊😊