https://github.com/vikashchauhan51/dockersample
Sample Dotnet 6 Core API app with docker
https://github.com/vikashchauhan51/dockersample
docker docker-image dockerfile dotnet dotnet-core microservices
Last synced: 2 months ago
JSON representation
Sample Dotnet 6 Core API app with docker
- Host: GitHub
- URL: https://github.com/vikashchauhan51/dockersample
- Owner: VikashChauhan51
- Created: 2022-09-01T12:32:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T12:55:18.000Z (almost 4 years ago)
- Last Synced: 2025-02-23T22:29:55.529Z (over 1 year ago)
- Topics: docker, docker-image, dockerfile, dotnet, dotnet-core, microservices
- Language: C#
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DockerSample
Sample Dotnet 6 Core API app with docker.
## Prerequisites
- Docker should be installed. If not then please follow [this](https://gist.github.com/VikashChauhan51/fc2dad10334dc4057a24ae23220ce506) document.
- Git should be installed.
- Visual Studio should be installed.
## Project Structure
```
C:/DockerSample
└───src
└───SampleAPI
├───Controllers
└───Properties
```
## Run in Dev
- Run docker desktop on you system.
- Build project and run it with `docker` profile from Visual Studio.
> Here, Visual Studio will generate docker dev image and start container automatically.
## Create Docker Image from Visual Studio
- Build project from Visual Studio.
- Right click on Dockerfile and select `Build docker image` option from context menu.
## Deploy API image in Docker
- Run ` docker run -p 5000:80 -e SimpleProperty="docker!" -e ASPNETCORE_ENVIRONMENT="Development" --name=coreapi -d sampleapi` command to create container.
- http://localhost:5000/swagger/index.html