commit 4574fa1da3b42fa28d1547fa04475dfb841b9529 Author: froejdh_e Date: Fri Apr 11 08:15:48 2025 +0200 first attempt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67646fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM rhel9-developer-gitea-actions + +RUN dnf -y install cmake +RUN dnf -y install python3.12 +RUN dnf -y install python3.12-devel +RUN dnf -y install python3.12-pip + +COPY files/rpmmacros /root/.rpmmacros diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..ff91832 --- /dev/null +++ b/Readme.md @@ -0,0 +1,36 @@ +# Overview +This is the PSI rhel9 docker developer image. It contains most developer tools especially for building rpms, etc. + + +# Usage + +The image can be used as follows: + +```bash +docker run -it --rm gitea.psi.ch/detectors-int/rhel9-detectors-dev +``` + +To build an RPM this image can be used as follows: +```bash +docker run --platform linux/amd64 -it --rm -v $(pwd):/data --workdir /data gitea.psi.ch/images/rhel9-developer-github-actions rpmbuild -ba whatever.spec +``` + + +To base other images upon this image use +```dockerfile +FROM detectors-int/rhel9-detectors-dev +``` +in your Dockerfile + +# Build + +To build the image use: +```bash +docker build --platform linux/x86_64 -t gitea.psi.ch/detectors-int/rhel9-detectors-dev . +``` + +To push the image to the central container registry do: +```bash +docker login gitea.psi.ch +docker push gitea.psi.ch/detectors-int/rhel9-detectors-dev +``` diff --git a/files/rpmmacros b/files/rpmmacros new file mode 100644 index 0000000..e47f2b9 --- /dev/null +++ b/files/rpmmacros @@ -0,0 +1,8 @@ +%_topdir %{getenv:PWD} +%_builddir %{_topdir}/BUILD +%_buildrootdir %{_topdir}/BUILDROOT +%_rpmdir %{_topdir}/RPMS +%_sourcedir %{_topdir}/SOURCES +%_specdir %{_topdir}/SPECS +%_srcrpmdir %{_topdir}/SRPMS +%packager Docker RPM Build Image