Skip to content

ymartel06/aspnet-docker-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

aspnet-docker-examples

MVC Simple

MVC Simple is just a little MVC Application running inside Docker.

From Ubuntu Command Line:

Browse to http://localhost/ and you should use the MVC Welcome page.

WEBAPI Simple

WEBAPI Simple is a simple example to how to setup a WEBAPI inside Docker

From Ubuntu Command Line:

Example of requests:

  • GET /api/todo : GetAll
  • POST /api/todo : CreateTodoItem
  • GET /api/todo/1 : GetById
  • DELETE /api/todo/1 : DeleteItem
  • GET /api/todo/abc : none – returns 404
  • PUT /api/todo : none – returns 404

for lazy, curl examples:

curl -i -X GET http://localhost/api/todo
curl -i -X GET http://localhost/api/todo/1
curl -i -X DELETE http://localhost/api/todo/1
curl -i -X POST http://localhost/api/todo -H 'Content-Type: application/json' -d '{"Title":"WebApi + Docker","IsDone":"true"}'

Missing Git or Docker?

  • sudo apt-get install git
  • sudo apt-get install docker.io

About

Some examples to set up aspnet with docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages