Day 17 : Docker Project for DevOps Engineers.

Day 17 : Docker Project for DevOps Engineers.

Follows these steps for creation of this projects...

Step1 :-

You have to git repository of that projects.

git clone https://github.com/LondheShubham153/django-todo-cicd.git        

Step 3 :-

Create Dockerfile in projects..

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.

FROM python:3

WORKDIR /data

RUN pip install django==3.2

COPY . .

RUN python manage.py migrate

EXPOSE 8000

CMD ["python","manage.py","runserver","0.0.0.0:8000"]
        

Step 4 :-

Build the image form Dockerfile

docker build -t django-tod-app:latest .        

You got this type of interface like pull complete.

Step 4 :-

Run the container

docker run -d -p 8000:8000 django-tod-app:latest        

-d means "container in background " deamon

-p means "ports" --- 1st 8000 is local port , 2nd one is container port

Step 5 :-

Go to your instance security change inbound rules

Step 6 :-

Access by using

https://13.233.223.209:8000/todos/        
13.233.223.209  -- Your instance public ip 
8000    -- your container port         

Runninnnnnnngggg??????????


Fedir Kompaniiets

CEO & Co-Founder of Gart Solutions | Cloud Solutions Architect & Digital Transformation Consultant

1 å¹´

Great project tutorial, Shubham! ??

Roman B.

Cloud Architect | Co-Founder & CTO at Gart Solutions | DevOps, Cloud & Digital Transformation

1 å¹´

Sounds like a great project to enhance your DevOps skills! ??

要查看或添加评论,请登录

Ujawal Tiwari的更多文章

  • List of Docker Commands with Examples

    List of Docker Commands with Examples

    Key Terms related to docker commands Firstly, let’s get clear up some docker jargon terms to make sure you know what…

  • Docker Networking – Basics, Network Types & Examples

    Docker Networking – Basics, Network Types & Examples

    Docker is a containerization platform that uses OS-level virtualization to package software applications and their…

    1 条评论
  • jenkins installation on ubuntu

    jenkins installation on ubuntu

    You can install jenkins by following some simple steps..

  • Dockerfile, Docker-Compose, Swarm and Volumes

    Dockerfile, Docker-Compose, Swarm and Volumes

    Dockerfile Docker is a tool that makes it easy to run applications in containers. Containers are like small packages…

  • Chmod Command in Linux | File Permissions in Linux...

    Chmod Command in Linux | File Permissions in Linux...

    if you unable to read , write and execute the file like this. How to see the permissions In Linux 3 types of…

  • Docker Commands :

    Docker Commands :

    Common Commands: run Create and run a new container from an image exec Execute a command in a running container ps List…

  • dvance Git & GitHub for DevOps Engineers: Part-1

    dvance Git & GitHub for DevOps Engineers: Part-1

    ?Git Branching: Branches are essential in Git to isolate development work without affecting other parts of the…

  • Complete Jenkins CI/CD Project - Continued with Documentation ... Day25

    Complete Jenkins CI/CD Project - Continued with Documentation ... Day25

    Continuous Integration (CI) and Continuous Deployment (CD) are crucial components of modern software development…

社区洞察

其他会员也浏览了