๐ฌDay 17 - Docker Project for DevOps Engineers.

Hey there! ๐
I'm Pratik R. Mandge, a DevOps Engineer passionate about all things AWS DevOps Technology. Currently on a learning adventure, I'm here to share my journey and Blog's in the world of cloud and DevOps.
๐ ๏ธ My focus? Making sense of AWS services, improving CI/CD, and diving into infrastructure as code. Whether you're fellow interns or curious enthusiasts, let's grow together in the vibrant DevOps space.
๐ Connect with me for friendly chats, shared experiences, and learning moments. Here's to embracing the learning curve and thriving in the exciting world of AWS DevOps Technology!
Follow me on LinkedIn: https://www.linkedin.com/in/pratik-mandge363
๐ฌDocker
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 Docker file.
๐ฌDocker file
A Docker file 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 Docker file 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
1: Create a Dockerfile for a simple web application
# Use the official Python image as a base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the Python quiz app files into the container
COPY . /app
# Install Flask
RUN pip install Flask
# Expose port 5000 for web traffic
EXPOSE 5000
# Run the Flask app when the container starts
CMD ["python", "app.py"]
2: Build the Image and Run the Container
docker build -t my-python-app . #command for build the Docker Image
docker run -p 5000:5000 my-python-app #Run the Docker Container
3: Verify that application is working by accessing it in a web browser at http://localhost:5000.

4: Push the image to a public or private repository (e.g. Docker Hub )
docker login #Login your Docker Hub
docker tag my-python-app username/my-python-app #Tag your image &
#Replace username with your Docker Hub username.
docker push username/my-python-app #Push the image to Docker Hub
#After pushing the image, it should be available in your Docker Hub repository.

๐ธI think this blog will be quite valuable, offering unique viewpoints and introducing new and engaging ideas. ๐
๐ Happy learning!




