Improve build process - hierarchy
Currently, we rely on the builder.yaml file to list known containers, running docker-builder without args builds all the containers defined in the yaml file. Setting args after the bin only builds the required container. BUT it doesn't rebuild containers that depend on it - e.g. rebuild python container should auto rebuild the django container that depends on it.
The dependencies are "defined" in the Dockerfile file, after the FROM keyword.
To be noted:
- the
FROMkeyword list the complete name, including the hub.docker username (wiredcraft/bob- is user wiredcraft, container's name bob) - but onlybobis set as folder name - most likely a dependency tree need to be built from the parsing of all the
Dockerfile - an option (in
docopt) may have to be added to allow / bypass the auto build of dependencies and still limit only to the containers listed - we may want to "drop" the containers list from the
builder.yamland rely on the current folder / subfolder -- to be discussed.
@zbal have a look at https://github.com/6si/shipwright it automatically generates a build graph from a directory of Dockerfiles
@graingert thanks for the note - interesting approach also shipwright - I'll give it a shot!