🐳 Docker Image Creation and Pushing to Docker Hub
This document explains how to create a Docker image from your project and push it to Docker Hub.
🛠 Step 1: Create a Dockerfile
Place a Dockerfile
in the root of your project directory.
FROM python:3.11-slim
RUN pip install pandas scikit-learn matplotlib
COPY . .
CMD ["python","hello_world_ml.py"]
🏗️ Step 2: Build the Docker Image
Use the command below to build the image from the Dockerfile.
docker build -t your-dockerhub-username/image-name:tag .
🚀 Step 3: Push Image to Docker Hub
After building the image, push it to Docker Hub using:
docker push your-dockerhub-username/image-name:tag