HACKER Q&A
📣 dzonga

Local Development Environment


what's your go to way of setting up a simple but efficient shareable local development environment. lately been running into problems with vagrant and recent ubuntu images. and maybe will go back to using docker + skaffold so wanted to know what are people using these days.


  👤 aprdm Accepted Answer ✓
Depends what you're doing. For Python using something like virtualenv and pyenv feels like enough.

For javascript based projects I also feel that nodejs contains its dependencies pretty well for local dev.

Golang works well multi platform and with go modules the dependencies are in the go.mod file

Dunno, if you're sharing across unix systems, and depending on what you're doing, you don't need much.

For external services like databases, caches and etc. a docker-compose file is usually enough..


👤 danieka
I've started using docker-compose the last two months. This is for frontend development with 3-4 backend services and rather old versions of MySQL and PHP (not EOL but nothing I want to install on my OSX machine). I've used vagrant previously, but the performance hit and memory usage made me look at docker.

So far I'm really happy.

We build the backend services on push to main on Github and push them to AWS container repository. I run PHP in a custom image which is basically php:x.x-apache + some extra PHP plugins.

Another usage for docker is that we have DB images which come complete with a test fixture. So instead of the default mysql image we have a custom image that contains a test database that we use for e2e tests. It's easy to reset the container to get back to a good known state and it's also easier for developers to get started.