Turbocharging Docker build

Tuesday 01 March 2016

Building a Docker image can take a bit of time depending on what you have to do. Specially when you have to do something like DNU Restore, DotNet Restore, NPM Install or Nuget Restore builds can become slow because packages might have to be downloaded from the internet. Take the following Dockerfile which does a DNU Restore. FROM microsoft/aspnet:1.0.0-rc1-update1-coreclrMAINTAINER Maurice de Beijer <maurice.de.beijer@gmail.com>COPY . ./app WORKDIR ./appRUN dnu restoreEXPOSE 5000CMD ["--server.urls", "http://*:5000"]ENTRYPOINT ["dnx", "web"] Running the Docker build multiple times without any changes is quite fast. To time it I am using the command: time docker build -t dotned . … Continue reading Turbocharging Docker build