DEV Community

Discussion on: How to Use a Remote Docker Server to Speed Up Your Workflow

Collapse
 
dnk8n profile image
Dean Kayton • Edited

I use Packer to preconfigure a Docker Host image. I then use packer again, which spins up this image, runs Docker build, then pushes to registry and destroys the machine (currently need to add a little hacks to get it not to make another image).

This way, my remote builder is only up for the duration of the build. Downside though is it takes about 4min of dev time waiting for infrastructure to start and be destroyed.

So gotta decide which is more costly, an always on Docker server or those wasted dev minutes!

But with my method I often spin up super Beasty spot instance machines with great network.

Collapse
 
kamaln7 profile image
Kamal Nasser

That's also a good approach! Depending on the cost difference I'd suggest looking into deploying the smallest (i.e. cheapest) instance you can and then resizing it up/down when you need to use it as a Docker host. That could help cut down the waiting time without raising the costs too much.