DockerFile Findings for Follow Up Efforts - DevOps-MBSE/AaC GitHub Wiki
Some research was done regarding the possibility of having a central Docker file in the .github repository. Other AaC repositories would access that central Docker file for their own docker container needs, potentially with specific repository additions. While this seems feasible, cross repository docker file usage was determined to not be straightforward.
My initial reading of some sites suggested that this could be a possibility https://stackoverflow.com/questions/69234878/using-shared-dockerfile-for-multiple-dockerfiles. Upon re-reading, however, most of the documentation and discussions on this topic are oriented to multiple Docker files within a single repository.
- https://stackoverflow.com/questions/69234878/using-shared-dockerfile-for-multiple-dockerfiles
- https://stackoverflow.com/questions/26753030/how-to-build-docker-image-from-github-repository
- https://stackoverflow.com/questions/65275211/do-i-need-to-share-the-docker-image-if-i-can-just-share-the-docker-file-along-wi We came to the conclusion that the easiest and most straightforward way at this time would be to host a source Docker file in the .github repository. New AaC repositories should use this source Docker file as their default file, adding any additional specific needs that they may have. To this end we aligned the following AaC repositories to the Docker file now in the .github repository:
- AaC
- aac-gherkin
- aac-rest-api
- aac-spec
Additionally, the aac-puml repository was aligned to the source Docker file but also has an additional install specific to that repository. This is an example of extended the base source file.
Currently: With the current implementation it is now up to the AaC team to keep these files aligned.
Future Work: Additional research, or discussion with someone more experienced with containers across multiple github repositories, may reveal a solution to having a single file, with potential extensions specific to each repository as needed. This would be a more ideal solution.