I am somewhat obsessed with clean, repeatable, maintainable dev environments and Docker has all the pieces to
create one. For the past several months on several projects, I’ve been using Docker (and docker-compose
) to not
only run services like Postgres and Redis, but also as a virtual machine in which to run all my dev commands. My
Mac is only running Docker and vim.
The problem is that Docker on Mac has very slow file system access. Running bin/rails server
on a fresh Rails
app can take almost a minute to come up. I recently discovered that, by using NFS, file system access is way
faster. This creates a bit of a problem for webpack-dev-server
, but this, too, can be fixed. I want to write
out what I did in case it’s helpful.