romhut / criterion

This project is no longer maintained - Criterion is a Continuous Integration app built in PHP using MongoDB. Criterion is very easy to setup, and you can add GIT repositories from any provider, and run any commands you wish against it.
MIT License
53 stars 6 forks source link

Create a Docker instance #82

Closed outrunthewolf closed 2 years ago

outrunthewolf commented 10 years ago

What are your thoughts on creating a Dockerfile for Criterion?

So a user could simply pull the Dockerfile, Docker would then install all dependencies for Criterion, run composer to pull in Criterion, and expose the application on a port automatically.

For those who want it of course, another way to get up and running quickly

scottrobertson commented 10 years ago

:+1:

Sounds like an awesome idea to me. I have had 0 experience with Docker, have you or @marcqualie ?

marcqualie commented 10 years ago

What would be the main advantages? I like the idea, would be useful to have a use case for it though

outrunthewolf commented 10 years ago

A few scenarios:

  1. You want to get Criterion up and running on an empty server without building dependencies by hand.
  2. You want to try Criterion on your server but are purposefully running a different version of PHP lets say?
  3. You want a quick way to try Composer on your local machine, without having redundant virtual hosts, or configurations should you decide not to use it again.

Instead of building all of your dependencies by hand, setting up a stack, then composing Criterion, the Dockerfile will handle all this for you within the Docker container.

Thinking about it though, perhaps a Docker file should be a seperate repo, if you specifically want to pull the Docker container file, you probably don't want the rest of the repository as well

marcqualie commented 10 years ago

I'm not 100% sure on how it all works (regarding the separate repo) but it sounds like a pretty neat setup to me. I'd been toying with the idea of vagrant for the same purpose but I don't really like it, Docker seems like the way forward.

When I originally saw this I thought you meant using docker to run the tests in isolated instances, instead of installing all of the project's dependencies on your criterion box. Reckon that could also be achievable?

scottrobertson commented 10 years ago

The workers should technically be able to run on any box right now (i'd need to test that), all you would need to do is use the MongoDB config details of the main Criterion box. So that would be a really cool setup too. Being able to deploy worker boxes with docker.

outrunthewolf commented 10 years ago

You could spawn and run docker containers automatically, you can mount folders/files from outside the container within, I suppose its definitely achievable. Quite a novel idea actually!