FBAD is a commandline tool for projects requiring multiple docker images.
# Features
- easily build projects with multiple docker images
- build on remote server
- automatically push build images to registry
- select a subset of images to build
- build images in parallel on multiple buildservers
- you can also build all images on each buildserver (useful for different os architectures)
- run command before each image build (useful for generating dockerfiles before the build)
- automatically format tags (e.g. `myproject-{arch}` -> `myproject-x86`)
- show build output live
- ...
# Recommended directory structure
```
myproject/
imagea/
DOCKERFILE
...
imageb/
DOCKERFILE
...
...
project.py
```
# Example `project.py`
```python
"""example fbad build file"""
from fbad import Project, Image
# the project contains all project and image data
project = Project(
# name of the project
name="Project",
# list of images of the project
images=[
# most simple form
# build the dockerfile in 'cachserver/'
# use 'cachserver/Dockerfile' as dockerfile
# build cwd is 'cachserver/'
# name and tag are 'cachserver'
Image(
path="cacheserver/",
),
# build image from the directory which contains 'project.py'
# everything like above, but cwd is different
# this is useful if you have shared files, like a package for common functionality
# please note that all files being contained in the buildpath will be send to the buildserver.
Image(
path="webserver/",
buildpath="",
),
# build image with auto-formated tag and auto-generated dockerfile
# the tag will be formated on the buildserver (e.g. 'worker-x86')
# the dockerfile will also be generated on the buildserver
# this is useful for building architecture specific images or
# images with architecture-specific dependencies
# this example also uses a custom buildpath
Image(
path="worker/",
tag="worker-{arch}",
buildpath="",
preexec_command=["/usr/bin/python", "worker/generate_dockerfile.py"],
),
# build image with a dockerfile having a different name.
# dockerfile will be 'db/dbdockerfile.txt'
Image(
path="db/",
dockerfile="dbdockerfile.txt",
),
],
)
if __name__ == "__main__":
# run the cli
project.main()
```
# Buildserver
A buildserver is available using the `fbad-server` command.
You can also access import the buildserver as `fbad.server.FBADServerFactory`.
If no custom buildserver is specified when building a project, another buildserver is temporarly started.
# Installation
**Requirements**
FBAD requires python2 (most implementations should work) and twisted.
The buildserver also requires docker to be installed.
**Install via pip**
1. `pip install fbad`
2. Done
**Install from source**
1. `git clone https://github.com/bennr01/fbad.git`
2. `cd fbad`
3. `python setup.py install` (`sudo` may be required, depending on your python configuration)
4. Done.
Metadata
Release files for fbad 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fbad-0.1.4.tar.gz | 12.7 kB | Without provenance | Details for fbad-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fbad-0.1.4-py2-none-any.whl | Python 2 | none | any | Details for fbad-0.1.4-py2-none-any.whl |
Total release size: 30.3 kB
Release files / fbad-0.1.4.tar.gz
| Download URL | fbad-0.1.4.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3350e390cac969deee880f65753841a189613b4c857ed5245ffa97febf05da13
|
|
BLAKE2b-256 checksum How to use checksums |
63b8566f1bbb100412c2a0e28c2447553bd13bd1965bebb1e080e9c5d16d7e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Release files / fbad-0.1.4-py2-none-any.whl
| Download URL | fbad-0.1.4-py2-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
8fd710ced08605df2348e46b38a43993b342cf343a47e21da5725338c6346953
|
|
BLAKE2b-256 checksum How to use checksums |
f9f2e43e8b8b2f33d0fda8a51d88b44ba00252a1cac8d04f5c59b5aa0020e519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for fbad 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.