HtmlProject is a simple web project that serves a "Hello World" message from an HTML file. This project is dockerized to make it easy to deploy and run in any environment.
The basic structure of the project is as follows:
HtmlProject/
│
├── .vscode/ # Configuration files for Visual Studio Code
├── Dockerfile # Dockerfile to build the container image
├── index.html # HTML file that contains the main content
└── README.md # Project documentation
To run this project locally or inside a Docker container, you need the following:
- Docker (if you want to run in a container)
- Git (to clone the repository)
Clone it using Git:
git clone https://github.com/lessalcu/HtmlProject.git
cd HtmlProjectTo build the Docker image, run the following command:
docker build -t lssalas/html-project .Once the image is built, run the container:
docker run -d -p 8081:80 lssalas/html-projectThe application will be available at http://localhost:8081/ and you should see the message ¡Hola mundo desde HTML, Lesly Salas SI08!.
Note: If you encounter an error with port 8080 being already in use, you can either:
- Terminate the process occupying the port (use
taskkill /PID <PID> /Ffor Windows to stop the process), or - Run the container on a different port, such as
8081, by using the commanddocker run -d -p 8081:80 lssalas/html-project.
To download the image from Docker Hub, run:
docker pull lssalas/html-project:latestOnce the image is downloaded, run the container:
docker run -d -p 8081:80 lssalas/html-project:latestThis will start the container and the application will be available at http://localhost:8081/.
- Make sure Docker is running.
- If you have problems accessing
http://localhost:8081, verify that the port is not in use or check your firewall.
- Project developed by Lesly Salas (https://github.com/lessalcu).