Tired Of Waiting For ‘npm install’ To Finish Every Time You Touch Docker?

Datetime:2017-03-20 05:34:35         Topic: Docker          Share        Original >>
Here to See The Original Article!!!

In February, I launched the first of my WatchMeCode: Live! sessions on Docker. This is a series where I do a live webinar-style session of talking about code, providing commentary and getting live Q&A from the audience at the end.

For March 2017, I’m preparing another session on the ever-so-frustrating npm delay in Docker.

What is the npm delay?

This tweet from Sergio Rodrigo sums it up best:

Now throw Docker into the mix with “RUN npm install” in your Dockerfile and a host-mounted volume to edit code, and things get really ugly, fast.

What was once a 5 minute install is now more than 10 minutes. And worse, it seems every time you touch anything in Docker or your project, you incur yet another round of “npm install”.

Fortunately, there is a solution.

I’ve recently been using some tools – built in to Docker – to cut this constant time sink from my Docker projects.

Instead of having to deal with the npm delay by playing video games, watching netflix or generally slacking in my work, I’m only running “npm install” when I actually need a new dependency. I no longer have Docker running it for every single build of my Docker image, or when touch anything in my project.

The best news, though, is that these are simple tools and techniques and they have a huge impact. And I want to show you how to use them in the WatchMeCode: Live! session on March 27th.

Join me for this event and I’ll show you how to eliminate the npm delay in your Docker project.

I look forward to seeing you at this live session!

– Derick








New

Put your ads here, just $200 per month.