Skip to content

Commit

Permalink
fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Mar 24, 2024
1 parent 143ffa1 commit 86d00d0
Show file tree
Hide file tree
Showing 8 changed files with 348 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/fedora37.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: fedora37

on:
pull_request:
push:
paths:
- 'fedora37/**'
- '.github/workflows/fedora37.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:

permissions: write-all

jobs:
# Test the image builds and works correctly.
test:
name: Test fedora37
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/[email protected]

- name: Test building image.
run: cd fedora37 && docker build -t fedora37 .

- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora37

# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/build-push-action@v2
with:
context: fedora37/
file: fedora37/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: |
${{ github.repository }}:fedora37
67 changes: 67 additions & 0 deletions .github/workflows/fedora38.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: fedora38

on:
pull_request:
push:
paths:
- 'fedora38/**'
- '.github/workflows/fedora38.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:

permissions: write-all

jobs:
# Test the image builds and works correctly.
test:
name: Test fedora38
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/[email protected]

- name: Test building image.
run: cd fedora38 && docker build -t fedora38 .

- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora38

# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/build-push-action@v2
with:
context: fedora38/
file: fedora38/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: |
${{ github.repository }}:fedora38
67 changes: 67 additions & 0 deletions .github/workflows/fedora39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: fedora39

on:
pull_request:
push:
paths:
- 'fedora39/**'
- '.github/workflows/fedora39.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:

permissions: write-all

jobs:
# Test the image builds and works correctly.
test:
name: Test fedora39
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/[email protected]

- name: Test building image.
run: cd fedora39 && docker build -t fedora39 .

- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora39

# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/build-push-action@v2
with:
context: fedora39/
file: fedora39/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: |
${{ github.repository }}:fedora39
67 changes: 67 additions & 0 deletions .github/workflows/fedora40.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: fedora40

on:
pull_request:
push:
paths:
- 'fedora40/**'
- '.github/workflows/fedora40.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:

permissions: write-all

jobs:
# Test the image builds and works correctly.
test:
name: Test fedora40
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/[email protected]

- name: Test building image.
run: cd fedora40 && docker build -t fedora40 .

- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora40

# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/build-push-action@v2
with:
context: fedora40/
file: fedora40/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: |
${{ github.repository }}:fedora40
20 changes: 20 additions & 0 deletions fedora37/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:37

LABEL maintainer="Michael Buluma"
LABEL build_date="2024-03-24"

ENV container=docker

# Enable systemd.
RUN dnf -y install systemd && dnf clean all && \
(cd /lib/systemd/system/sysinit.target.wants/ ; for i in * ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i ; done) ; \
rm -f /lib/systemd/system/multi-user.target.wants/* ;\
rm -f /etc/systemd/system/*.wants/* ;\
rm -f /lib/systemd/system/local-fs.target.wants/* ; \
rm -f /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -f /lib/systemd/system/basic.target.wants/* ;\
rm -f /lib/systemd/system/anaconda.target.wants/*

VOLUME ["/sys/fs/cgroup"]
CMD ["/sbin/init"]
20 changes: 20 additions & 0 deletions fedora38/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:38

LABEL maintainer="Michael Buluma"
LABEL build_date="2024-03-24"

ENV container=docker

# Enable systemd.
RUN dnf -y install systemd && dnf clean all && \
(cd /lib/systemd/system/sysinit.target.wants/ ; for i in * ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i ; done) ; \
rm -f /lib/systemd/system/multi-user.target.wants/* ;\
rm -f /etc/systemd/system/*.wants/* ;\
rm -f /lib/systemd/system/local-fs.target.wants/* ; \
rm -f /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -f /lib/systemd/system/basic.target.wants/* ;\
rm -f /lib/systemd/system/anaconda.target.wants/*

VOLUME ["/sys/fs/cgroup"]
CMD ["/sbin/init"]
20 changes: 20 additions & 0 deletions fedora39/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:39

LABEL maintainer="Michael Buluma"
LABEL build_date="2024-03-24"

ENV container=docker

# Enable systemd.
RUN dnf -y install systemd && dnf clean all && \
(cd /lib/systemd/system/sysinit.target.wants/ ; for i in * ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i ; done) ; \
rm -f /lib/systemd/system/multi-user.target.wants/* ;\
rm -f /etc/systemd/system/*.wants/* ;\
rm -f /lib/systemd/system/local-fs.target.wants/* ; \
rm -f /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -f /lib/systemd/system/basic.target.wants/* ;\
rm -f /lib/systemd/system/anaconda.target.wants/*

VOLUME ["/sys/fs/cgroup"]
CMD ["/sbin/init"]
20 changes: 20 additions & 0 deletions fedora40/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:40

LABEL maintainer="Michael Buluma"
LABEL build_date="2024-03-24"

ENV container=docker

# Enable systemd.
RUN dnf -y install systemd && dnf clean all && \
(cd /lib/systemd/system/sysinit.target.wants/ ; for i in * ; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i ; done) ; \
rm -f /lib/systemd/system/multi-user.target.wants/* ;\
rm -f /etc/systemd/system/*.wants/* ;\
rm -f /lib/systemd/system/local-fs.target.wants/* ; \
rm -f /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -f /lib/systemd/system/basic.target.wants/* ;\
rm -f /lib/systemd/system/anaconda.target.wants/*

VOLUME ["/sys/fs/cgroup"]
CMD ["/sbin/init"]

0 comments on commit 86d00d0

Please sign in to comment.