CSharpProject is a simple web application developed in C# using ASP.NET Core. This project runs inside a Docker container and responds with a "Hello world from C#, Lesly Salas SI08!" message on port 80.
The basic structure of the project is as follows:
CSharpProject/
│
├── Dockerfile # Dockerfile to build the container image
├── app.cs # Application source code
└── README.md # Project documentation
To run this project locally or inside a Docker container, you need to have the following:
- Docker (to run the project inside a container)
- Git (to clone the repository)
Clone the repository using Git:
git clone https://github.com/lessalcu/CSharpProject.git
cd CSharpProjectTo build the Docker image, run the following command:
docker build -t lssalas/csharp-project .Once the image has been built, you can run the container with the following command:
docker run --name csharp-project -p 80:8080 lssalas/csharp-projectThe application will be available at http://localhost/.
To download the image from Docker Hub, run:
docker pull lssalas/csharp-project:latestOnce the image has been downloaded, run the container with:
docker run --name csharp-project -p 80:8080 lssalas/csharp-projectThis will start the container and you will be able to access the application at http://localhost/.
- Make sure Docker is running.
- If you have problems accessing
http://localhost/, check that port80is not in use by another process or that there are no firewall issues.
- Project developed by Lesly Salas (https://github.com/lessalcu).