ab – Builder¶
Docker-based build service. Runs project builds inside Docker containers (Docker-in-Docker), triggered by the Manager after a successful push.
How It Works¶
sequenceDiagram
participant am as am (Manager)
participant Docker
participant ab as ab (Container)
participant Repo as Repository
am->>Docker: start ab container
Docker->>ab: mount repo + docker.sock
ab->>Repo: git clone /REPO.git
ab->>ab: find .applikant/build.sh
ab->>ab: execute build script
ab-->>Docker: exit
- The Manager starts the builder container with the repository mounted
build.shclones the mounted bare repository- Searches for
.applikant/build.shin the cloned repo - If present: executes the build script (which can build Docker images)
- If absent: aborts with error
Project Requirements¶
For a repository to be buildable, it must contain:
Usage¶
docker run -it \
-v /path/to/repo.git/:/REPO.git/ \
-v /var/run/docker.sock:/var/run/docker.sock \
applikant/builder
| Mount | Description |
|---|---|
/REPO.git/ |
Git bare repository to build |
/var/run/docker.sock |
Docker socket for Docker-in-Docker |
Build the Docker Image¶
Base image: debian with git and docker.io.
Status¶
Work in progress
Basic Docker build works. Integration with the Manager (automatic trigger after push) is not yet implemented.