
Online Dockerfile lint - oilbeater
http://dockerfile-linter.com/?lang=en
======
alexc05
Split any "download dependency" steps from the rest of the code copy.

I've got an example with benchmarks here: [https://github.com/aspnet/aspnet-
docker/issues/123](https://github.com/aspnet/aspnet-docker/issues/123)

old-speed Start: 06:03:13.313 Finish: 06:06:40.640

new-speed Start: 06:00:36:036 Finish: 06:00:45:045

So essentially you copy the package.json or project.json, run dnu restore/ NPM
install _then_ copy the rest of the project.

    
    
         COPY ./project.json /app/project.json
         WORKDIR /app
         RUN ["dnu", "restore"]
         COPY . /app
    
         EXPOSE 5000/tcp
         ENTRYPOINT ["dnx", "-p", "project.json", "web"]
    
    

What this means is that if dependencies don't change the step where you
downloaded them will be a cached binary.

It makes iteration a LOT faster.

~~~
oilbeater
Great advice,thanks!

