container:docker:dockerhub

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
container:docker:dockerhub [2025/07/27 20:01] – created ilyasacontainer:docker:dockerhub [2026/02/06 13:58] (current) – removed ilyasa
Line 1: Line 1:
-====== Docker : Building and Deploying a Docker Image and push it to Docker Hub ====== 
- 
-This guide walks you through containerizing an application using Docker. You'll write a Dockerfile, build the image, run it as a container, and  push it to Docker Hub. 
- 
- 
-===== Step 1:  App Project Structure ===== 
- 
- 
- 
-<code bash> 
-Demo-App 
-├── Dockerfile 
-├── index.html 
-└── nginx.conf 
-</code> 
- 
- 
- 
-===== Step 2: Create Dockerfile ===== 
- 
-Create a `Dockerfile` in the same directory: 
- 
-<code Dockerfile> 
-# Use the official Python image 
-FROM python:3.10-slim 
- 
-# Set working directory 
-WORKDIR /app 
- 
-# Copy files 
-COPY . . 
- 
-# Install dependencies 
-RUN pip install flask 
- 
-# Expose port 
-EXPOSE 5000 
- 
-# Run the application 
-CMD ["python", "app.py"] 
-</code> 
  
  • container/docker/dockerhub.1753621267.txt.gz
  • Last modified: 2026/02/01 21:08
  • (external edit)