Skip to content

Commit 037ba1d

Browse files
author
moander
committed
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.
1 parent a3d268b commit 037ba1d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samples/latest/HelloMvc/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM microsoft/aspnet
22

3-
COPY . /app
3+
COPY project.json /app/
44
WORKDIR /app
55
RUN ["dnu", "restore"]
6+
COPY . /app
67

78
EXPOSE 5004
89
ENTRYPOINT ["dnx", "project.json", "kestrel"]

samples/latest/HelloWeb/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM microsoft/aspnet
22

3-
COPY . /app
3+
COPY project.json /app/
44
WORKDIR /app
55
RUN ["dnu", "restore"]
6+
COPY . /app
67

78
EXPOSE 5004
89
ENTRYPOINT ["dnx", "project.json", "kestrel"]

0 commit comments

Comments
 (0)