What's your config management tool of choice? I assume they will have recipes/etc for basic tasks like that.
Personally I'd just put the call to `apt-get` and then `psql` into a shell script.
Either way, set the provisioner. Either do it in vagrant provisioning, or if that takes to long, build a base box with Packer and put the provisioner there.
Edit: or for a simpler use, look on Vagrantcloud.com and find a base box that has what you want, and run that.
If a box provides Postgres it's just `vagrant init vendor/boxname && vagrant up`.
That's what you're relying on with a '1 line command' in docker to give you Postgres: an image that someone else has created.
Whether a Postgres-only box exists in Vagrantcloud is irrelevant, unless your argument is purely on the merits of the pre-made boxes/images third parties have contributed.
Most boxes start in ~30s on reasonable hardware. I don't know how long the box will take to download because I don't know what box you might use, what vagrant provider (e.g. parallels boxes are usually a little bigger than vbox ones), what your internet connection speed is.
If your entire decision making process is "I only run things that take two seconds" then I don't think we can have a conversation because honestly I don't even think about the time vagrant takes to start.
My computer does multiple things all at once. It takes longer for my IDE to start and be usable than it does for Vagrant, and funnily enough computers can run multiple processes at once, so this whole "omg 30 seconds is too long to wait" argument doesn't fly for me.
The setup time is one of the argument, in docker the whole thing takes couple of seconds, you might not appreciate the quick boot up time but lot of others care about that. If you are happy with slow boot up time then you should not migrate to docker but if you want something quick and easy then consider docker.
Personally I'd just put the call to `apt-get` and then `psql` into a shell script.
Either way, set the provisioner. Either do it in vagrant provisioning, or if that takes to long, build a base box with Packer and put the provisioner there.
Edit: or for a simpler use, look on Vagrantcloud.com and find a base box that has what you want, and run that.