Skip to content

A simple static HTML website running inside a Docker container using Nginx

License

Notifications You must be signed in to change notification settings

ahmed-sayed-devops/docker-simple-html-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Simple HTML Web Site

📌 Project Idea

This project demonstrates how to run a simple static HTML web page inside a Docker container using Nginx as a web server.
The HTML page displays a short welcome message and a link to a LinkedIn profile.
The project also shows how to update the HTML content and see the changes instantly in the browser.


📂 Project Structure

  • codes/index.html → The main HTML web page file.
  • Dockerfile → Instructions for building the Docker image with Nginx.
  • screenshots/ → Step-by-step visual documentation.

🛠 How It Works

  1. Create a basic HTML page (codes/index.html) containing the desired message and link.
  2. Use a Dockerfile to copy the HTML file into an Nginx container.
  3. Build and run the container, exposing it to a specific port (e.g., 8080).
  4. Access the page via a web browser using the server’s Public IP and port.
  5. Update the HTML file to change the displayed message and re-deploy if needed.

Note: The HTML code is located in (codes/index.html).


📸 Screenshots

1️⃣ HTML Code

HTML Code
Shows the simple HTML code located in codes/index.html.


2️⃣ Creating the Container

Create Container
Container creation from Nginx image and container details.


3️⃣ First Browser Test

Browser First Test
The HTML page displayed successfully after entering the Public IP and port 8080.


4️⃣ Changing HTML Code

Change HTML Code
Modification of the displayed message in the HTML file.


5️⃣ Second Browser Test After Changes

Browser Second Test
Browser view after updating the HTML message.


✅ Result

A basic HTML web page was successfully hosted inside a Docker container using Nginx, with the ability to quickly update and view changes in real-time.


👤 Author

Ahmed Sayed
LinkedIn
GitHub


📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple static HTML website running inside a Docker container using Nginx

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages