Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T12:55:18.000Z (over 2 years ago)
- Last Synced: 2024-11-09T21:36:03.094Z (3 months 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