This is AspNet MVC Sample running on Docker using TAR
816
This shows a way to workaround the current limitation of the Docker client running natively from Windows. One current limitation is the Path separator issue. By using tar to archive the file you can achieve running the client and having the Docker host have a natural container.
This is the sample repository that is explained in the blog post:
The docker hub repo is here: https://registry.hub.docker.com/u/cicorias/dockermvcsample2/
You can run this directly from Docker by running the following command:
docker run -d -t -p 8080:5004 cicorias/dockermvcsample2
As with any Docker repo, the dependencies will be retrieved automatically, and when done you'll have a AspNet vNext process running with the sample MVC app from the github repo here: https://github.com/cicorias/dockerMvcSample
Here is the Docker file
FROM microsoft/aspnet:latest
MAINTAINER Shawn Cicoria "[email protected]"
# copy the contents of the local directory to /app/ on the image
ADD HelloMvc.tar /app/
RUN ls -l
# set the working directory for subsequent commands
WORKDIR app
RUN ls -l
# fetch the NuGet dependencies for our application
RUN kpm restore
# set the working directory for subsequent commands
# expose TCP port 5004 from container
EXPOSE 5004
# Configure the image as an executable
# When the image starts it will execute the “k web” command
# effectively starting our web application
# (listening on port 5004 by default)
ENTRYPOINT ["k", "kestrel"]
Content type
Image
Digest
sha256:51b149e59…
Size
216.1 MB
Last updated
almost 11 years ago
docker pull cicorias/dockermvcsample2