Quick start ASP.NET 5 image derived from official docker image and contains come "ready-to-go" sauce
10K+
Quick start image derived from official docker image and contains some "ready-to-go" sauce.
$ docker run -d -i -p 5000:5000 muojp/hellovnext-docker:latest
$ curl http://localhost:5000/
Hello World
this will fetch everything needed and start embedded web server.
Then, opening http://localhost:5000/ will show you the "Hello World" page.
$ docker run -i -t -p 5000:5000 muojp/hellovnext-docker:latest /bin/bash -i
root@0ec26fddd651:/opt/helloworld/src/helloworldweb# pwd
/opt/helloworld/src/helloworldweb
root@0ec26fddd651:/opt/helloworld/src/helloworldweb# cat Startup.cs
using System;
using System.Net.WebSockets;
using System.Threading.Tasks;
...
app.Run(async context =>
{
var payload = "Hello World";
context.Response.ContentLength = payload.Length;
await context.Response.WriteAsync(payload);
});
...
root@0ec26fddd651:/opt/helloworld/src/helloworldweb# apt-get install vim
root@0ec26fddd651:/opt/helloworld/src/helloworldweb# vim Startup.cs
Change the file as you like, and then
root@0ec26fddd651:/opt/helloworld/src/helloworldweb# k web
to launch web server. Then, execute Ctrl+p Ctrl+q to detach from the container.
$ curl http://localhost:5000/
Hello World!!!!
$ docker run -d -i -t -p 5000:5000 muojp/hellovnext-docker:latest k kestrel
MIT
Content type
Image
Digest
sha256:d26db4f8a…
Size
196.2 MB
Last updated
almost 11 years ago
docker pull muojp/hellovnext-docker