Skip to content

Instantly share code, notes, and snippets.

@KentaroAOKI
Created December 23, 2014 07:06
Show Gist options
  • Save KentaroAOKI/c62dc447b9831a72ee87 to your computer and use it in GitHub Desktop.
Save KentaroAOKI/c62dc447b9831a72ee87 to your computer and use it in GitHub Desktop.
Creating an ASP.NET vNext Docker Image for "/aspnet/Home/samples/HelloMvc"
FROM microsoft/aspnet
# copy the contents of the local directory to /app/ on the image
ADD . /app/
# set the working directory for subsequent commands
WORKDIR /app
# fetch the NuGet dependencies for our application
RUN kpm restore
# set the working directory for subsequent commands
WORKDIR /app/Home/samples/HelloMvc
# expose TCP port 5000 from container
EXPOSE 5000
# 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 5000 by default)
ENTRYPOINT ["k", "web"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment