Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amingolmahalle/sampledockerize

Sample Dockerize Asp.net Core Project.
https://github.com/amingolmahalle/sampledockerize

asp-net-core docker dokcer-compose

Last synced: 25 days ago
JSON representation

Sample Dockerize Asp.net Core Project.

Awesome Lists containing this project

README

        

Sample Dockerize Asp.net Core 3.1 Project.

First Create Network to watch 2 Container(means redis and project) on Docker:

sudo docker create network NetworkName

then run redis along with join to created network and persist data:

* before run below command.you need to create redis folder in /tmp/data/redis (path and folder name is optional.you can change their name as well as create folders path).

sudo docker run --rm --name redis -p6380:6379 -v /tmp/data/redis:/data --network NetworkName redis redis-server --appendonly yes

then Create Image by dockerFile:

sudo docker build -t projectname:1.0 .
* your project name have to be lowercase.

then after create image we have to run container from created image and join to network:

sudo docker run --rm --name ContainerName -p80:80 --network NetworkName projectname:1.0

finally call below url on browser:

localhost:80