You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a talk on how best to build Docker images, with a focus of course on building Node applications.
This would cover:
using official base images
ordering your Dockerfile to reduce layers and improve build speed
managing .dockerignore with respect to local builds and CI
installing dependencies before copying other code
two-stage builds and slim images
using dev dependencies at build time but excluding them from the deployed image (and not just "removing" them in the next layer)
pinning versions (both base images as well as dependencies) so you don't have to worry when you have to update a rarely-changing service
All these are takeaways from deploying Node services at State.
As an example, the Node service powering the website has a rather complicated build process, with ~170 MiB worth of dependencies (including dev), JS & CSS compilation and even invocations of PhantomJS to generate critical path CSS. We can build this into an image that's only 207 MiB, which is about a 6th of the non-slim build.
The text was updated successfully, but these errors were encountered:
I'd like to propose a talk on how best to build Docker images, with a focus of course on building Node applications.
This would cover:
.dockerignore
with respect to local builds and CIAll these are takeaways from deploying Node services at State.
As an example, the Node service powering the website has a rather complicated build process, with ~170 MiB worth of dependencies (including dev), JS & CSS compilation and even invocations of PhantomJS to generate critical path CSS. We can build this into an image that's only 207 MiB, which is about a 6th of the non-slim build.
The text was updated successfully, but these errors were encountered: