Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GTHell's avatar

Vagrant, Docker or what?

Too many to choose for beginner. I use Docker but I don't even know how it work because I just google everything to get it work on my server. But now on my own hosting, I want to use something else. Is docker still better?

I'm vultr 5$/month.

0 likes
5 replies
ejdelmonico's avatar

Do you mean for development or production? The use case matters.

1 like
goatshark's avatar
Level 14

@gthell - Yeah, what @ejdelmonico said. :) Personally, I stopped using vagrant in dev in favor of valet. I've got Docker in production and I really love a lot of things about it. That said, it isn't all rainbows and unicorns over in the Docker camp. I'm still stubbing my toes on things that wouldn't be an issue on an old school, everything-on-one-machine-and-one-OS installation.

1 like
Web Confection's avatar

@gthell I use docker for both. No point in using docker "only in production". Surely the idea is to duplicate your environment in a dev/test/live workflow?

I would suggest looking at minikube for local stuff. Allows you to run many docker containers inside an orchestration tool called Kubernetes. Maybe a bit much but a great thing to learn, very micro service focused if you like that stuff.

1 like
GTHell's avatar

I'm setting up for production. My plesk panel is messy with php, composer and node. I'm thinking of reinstalling it. On my dev machine there is no need for environment because, you know, my macbook only has 128gb.

Cronix's avatar

We use docker and vagrant. If we use docker on a project in production, that's what we use in dev. If we use just a traditional ubuntu stack in production, we use vagrant to mirror it in dev. Basically, just use whatever you're using in production while in dev, and you will rarely run into problems. It's when you mix them that you potentially open yourself up for gotchas and head scratchers. We just like things to work on deployment and not sit there "hey, but it's working on my dev box, why isn't it working on production?" That's just a giant waste of time and resources.

1 like

Please or to participate in this conversation.