NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Support building inside Docker containers #46

Open NiklasRosenstein opened 6 years ago

NiklasRosenstein commented 6 years ago

Building inside a Docker container should become a feature, not mandatory. Ideally, when this feature is available, you would be able to allow building with containers or not (you will also probably need to set things up so Flux can actually manage containers). At the same time, you should also be able to disable building without containers.

I've used docker-py before, it's quite easy to use.

Whether a build is executed in a container or not should be configurable in the CI configuration (see #24). Additionally, it would be nice if you could also configure a "default container image". If such an image is set up, we would even execute builds inside a container if they would usually be built on the Flux host directly.

NiklasRosenstein commented 6 years ago

Just throwing this in as I've come across this recently: Maybe we can also support hyperd.

gsantner commented 6 years ago

when we add the build fluxci file, I would again go to compatibility to other CIs. they usually have at line 1:

image: alpine:latest

which defaults to some admin defined value if docker is specified as mandatory (as in CI Admin don't want to allow local execution on host) but no such docker image tag is given. Then spin up docker and recursive copy over build-dir, cd workspace and execute script.