Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.
This repository was archived by the owner on Feb 13, 2019. It is now read-only.

Dockerfile re-downloads all dependencies on ANY code change #527

@AlexChesser

Description

@AlexChesser

I've gone into some pretty deep detail in this issue over here aspnet/aspnet-docker#123

And the team over at the aspnet-docker image would like to keep the image as the "lean base image" though they did provide some hints on how developers could improve their speed.

I've tweaked the order of operations in the Dockerfile over here:
AlexChesser@0ec1932

What this effectively does is allow's for the user's dependencies to be installed on the base image and effectively cached so an application restart can be done in seconds rather than minutes.

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

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

I've also added a somewhat lengthy comment around why things are being put in that order. Specifically since the generators are often the first documentation that users read, and the thing about "why it is slow" has taken me a couple weeks understanding how to tun docker performance, I think bubbling that key point up to fresh developers is really useful.

PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions