Skip to content

Commit

Permalink
fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Mar 25, 2024
1 parent 3114520 commit b9c1d29
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/fedora41.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: fedora41

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

permissions: write-all

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

steps:
- uses: actions/[email protected]

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

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

# 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/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/[email protected]
with:
context: fedora41/
file: fedora41/Dockerfile
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
push: true
tags: |
${{ github.repository }}:fedora41, ${{ github.repository }}:rawhide
2 changes: 1 addition & 1 deletion fedora39/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM fedora:39

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

ENV container=docker

Expand Down
20 changes: 20 additions & 0 deletions fedora41/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM fedora:41

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

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 b9c1d29

Please sign in to comment.