initial attempt
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 1m38s
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 1m38s
This commit is contained in:
commit
48db541f3f
28
.gitea/workflows/build_push.yml
Normal file
28
.gitea/workflows/build_push.yml
Normal file
@ -0,0 +1,28 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest-intranet
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.psi.ch
|
||||
username: detectors-gitea
|
||||
password: ${{ secrets.SERVICE }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: gitea.psi.ch/${{ github.repository }}:latest
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM gitea.psi.ch/images/rhel8-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
|
36
Readme.md
Normal file
36
Readme.md
Normal file
@ -0,0 +1,36 @@
|
||||
# Overview
|
||||
This is the PSI rhel8 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/rhel8-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/rhel8-developer-github-actions rpmbuild -ba whatever.spec
|
||||
```
|
||||
|
||||
|
||||
To base other images upon this image use
|
||||
```dockerfile
|
||||
FROM detectors-int/rhel8-detectors-dev
|
||||
```
|
||||
in your Dockerfile
|
||||
|
||||
# Build
|
||||
|
||||
To build the image use:
|
||||
```bash
|
||||
docker build --platform linux/x86_64 -t gitea.psi.ch/detectors-int/rhel8-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/rhel8-detectors-dev
|
||||
```
|
8
files/rpmmacros
Normal file
8
files/rpmmacros
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user