From 037ba1d500f8b1e94710ad1102bc53e7dbc00383 Mon Sep 17 00:00:00 2001 From: moander Date: Sat, 13 Jun 2015 08:34:32 +0000 Subject: [PATCH] Avoid full rebuild every time. I found this in a comment somewhere and tested it. It runs much smoother than the original one, but someone more experienced should review the change because I'm not sure what happends if the project contains bower/nmp config and so on. --- samples/latest/HelloMvc/Dockerfile | 3 ++- samples/latest/HelloWeb/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/latest/HelloMvc/Dockerfile b/samples/latest/HelloMvc/Dockerfile index 338c316d88..2aca3f0d20 100644 --- a/samples/latest/HelloMvc/Dockerfile +++ b/samples/latest/HelloMvc/Dockerfile @@ -1,8 +1,9 @@ FROM microsoft/aspnet -COPY . /app +COPY project.json /app/ WORKDIR /app RUN ["dnu", "restore"] +COPY . /app EXPOSE 5004 ENTRYPOINT ["dnx", "project.json", "kestrel"] diff --git a/samples/latest/HelloWeb/Dockerfile b/samples/latest/HelloWeb/Dockerfile index 338c316d88..2aca3f0d20 100644 --- a/samples/latest/HelloWeb/Dockerfile +++ b/samples/latest/HelloWeb/Dockerfile @@ -1,8 +1,9 @@ FROM microsoft/aspnet -COPY . /app +COPY project.json /app/ WORKDIR /app RUN ["dnu", "restore"] +COPY . /app EXPOSE 5004 ENTRYPOINT ["dnx", "project.json", "kestrel"]