container-common-scripts
container-common-scripts copied to clipboard
Avoid the `Dockerfile.rhel7` file, and use just `Dockerfile` if distgen is used
There are ugly hacks in the distgen logic related to *.rhel7 lsuffix (e.g. #75 fights with that), but there's no easy way to drop the old layout because it is required by:
- non distgen-enabled images
- common script scripts
- rebuild helper
- CI (probably)
So we would have to either (a) move all containers towards the new layout, or (b) support two layouts. IMO, (b) is less intrusive (using generators in source repo should stay opt-in) and I would prefer that. But anyways, take this issue as a tracker and place to discuss issues.
Additional note to #75, it would be much more natural if we generated (distgen layout) just:
postgresql-container/
└── output/
├── Dockerfile
└── root/
Or, on demand (e.g. to file the generated branch):
postgresql-container/
├── 10
│ ├── centos-7-x86_64
│ │ ├── Dockerfile
│ │ └── root
│ └── rhel-7-x86_64
│ ├── Dockerfile
│ └── root/
...
Not sure if I understand this correctly. One of the issues I see is that some of the files in postgres-container like cccp.yml are simply rendered once for each version, but the Dockerfiles has to be rendered n times (n is number of distros) for each version. This is why distgen and distgen-multi rules has to be separated in #75. Is the core of your idea that files like cccp.yml would be also generated n time for each branch after the layout change?
I have no opinion (yet) what's the best idea, but (probably) I'd like to have every file generated just once after running "make", for specific version and specific distro (two axes of the matrix) and e.g. with/without scl-utils incorporated. Tooling around would just pick appropriate coordinates on the axes... And e.g. generated branch would run the 'make generate' several times for predefined sets of coordinates.
Or, if we had to stick with generating all the combinations (== in-git predefined combinations), I'd like to remove the requirement that all the Dockerfile, Dockerfile.fedora and Dockerfile.rhel* files have to share the same root/ directory. Naturally, each template file generated into root/ could get different output depending on what --distro coordinate has been specified; this seems to be the major bottleneck of the current design.
RHEL7 and CentOS 7 reached EOL in June 2024. Closing this issue. This issue is not valid anymore.