r/docker • u/EthanJJackson • Jun 05 '20
Tutorial: How to Use Docker Volumes to Code Faster
Hi y'all,
I wrote a quick tutorial with an example app for Docker volumes, and how you can use volumes and nodemon to develop on Docker faster.
2
u/Serializedrequests Jun 06 '20
More like, how use 100 command line flags to achieve an environment almost as good as what you had without Docker.
I kid, but I am feeling a little disillusioned with containers as anything other than a deployment tool.
1
u/EthanJJackson Jun 06 '20
Ha. Honestly I agree, if you can do development without containers it's *waay* easier.
3
Jun 06 '20
There are situations where developing in containers can still be useful because it makes the setup much less time consuming and complicated when onboarding other devs.
I’ve been in situations as a backend developer where I needed a frontend developer to do some work on the front end. Instead of having to hold their hand through the initial setup process, and creating the database, connecting it, setting environment variables installing libraries etc etc you just get them to run the app in a container and develop it right away.
3
u/Serializedrequests Jun 06 '20 edited Jun 06 '20
I've always heard of this. At my job I've worked really hard to create something similar for the Rails apps we have. It makes for an incredible demo, but a terrible development experience.
restarting the server is common. Docker makes this more complicated. Docker compose up takes a long time when all you care about is the app server.
bugs and confusion from working though volumes. Sometimes you can get royally screwed by sharing the wrong files between the host and container.
vs code docker support, while impressive, has a show startup time and gets killed when you inevitably restart the container.
docker is amazing at adding confusion to networking.
docker compose is not one size fits all. I often find myself making small edits for various reasons, or adding and removing entire services such as a fake SMTP server. The development config is also useless for production and vice versa.
In summary I really want this to work like how you describe, but I just don't see how.
19
u/jftuga Jun 05 '20 edited Jun 06 '20
I think this is spam. It's a subtle way to advertise his cloud services without just being upfront about it.
Also, looks at OPs post history.