Skip to content

Commit 387c6cd

Browse files
committed
feat: add Fedora 45 images
1 parent c76b280 commit 387c6cd

11 files changed

Lines changed: 169 additions & 2 deletions

File tree

‎.github/workflows/build-fedora-init.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
security-events: write
2121
strategy:
2222
matrix:
23-
version: ['44-init']
23+
version: ['44-init','45-init']
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v4.2.2

‎.github/workflows/build-fedora-toolbox.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
security-events: write
2121
strategy:
2222
matrix:
23-
version: ['44-toolbox']
23+
version: ['44-toolbox', '45-toolbox']
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v4.2.2

‎fedora/45-init/Dockerfile‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM quay.io/fedora/fedora:45
2+
3+
COPY --chown=0:0 --chmod=0644 \
4+
dnf.conf /etc/dnf/dnf.conf
5+
6+
RUN --mount=type=bind,source=extra-packages,target=/extra-packages \
7+
set -ex ; \
8+
dnf install -y --setopt=install_weak_deps=False $(paste extra-packages) ; \
9+
dnf clean all ; \
10+
rm -f /etc/ssh/ssh_host_*
11+
12+
RUN set -ex ; \
13+
systemctl disable sshd.service ; \
14+
systemctl enable sshd.socket
15+
16+
COPY --chown=0:0 \
17+
systemd/10-disable-sandboxing.conf /etc/systemd/system/service.d/10-disable-sandboxing.conf
18+
19+
RUN truncate -s0 /etc/machine-id
20+
21+
ENV container="docker"
22+
23+
STOPSIGNAL SIGRTMIN+3
24+
25+
ENTRYPOINT [ "/usr/lib/systemd/systemd" ]

‎fedora/45-init/README.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## General informations
2+
3+
Custom Fedora 45 system container image for testing and debugging purposes.
4+
5+
This image uses `systemd` as entrypoint to create a lightweight "system" environment.
6+
7+
## How to run this image ?
8+
9+
In order to launch a Docker container with systemd as main process, a set of specific options must be set to ensure the correct execution of `systemd` in such environment:
10+
11+
```shell
12+
$ docker run [options] \
13+
--detach \
14+
--tty \
15+
--env=container="docker"\ # optional as set in the image
16+
--stop-signal=SIGRTMIN+3 \ # optional as set in the image
17+
--cgroupns=private \
18+
--security-opt=writable-cgroups=true \
19+
--tmpfs=/run \
20+
--tmpfs=/run/lock \
21+
--tmpfs=/tmp \
22+
ghcr.io/f-bn/fedora:45-init
23+
```

‎fedora/45-init/dnf.conf‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main]
2+
max_parallel_downloads=10
3+
defaultyes=True

‎fedora/45-init/extra-packages‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
acl
2+
bash-completion
3+
bind-utils
4+
dbus-broker
5+
diffutils
6+
hostname
7+
iproute
8+
iputils
9+
less
10+
lsof
11+
nano-default-editor
12+
netcat
13+
nftables
14+
openssh-clients
15+
openssh-server
16+
openssl
17+
procps-ng
18+
psmisc
19+
rsync
20+
socat
21+
strace
22+
systemd
23+
systemd-pam
24+
unzip
25+
util-linux
26+
wget2-wget
27+
which
28+
zip
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Disable sandboxing options globally that will not work in a container environment
2+
[Service]
3+
ProcSubset=all
4+
ProtectProc=default
5+
ProtectControlGroups=no
6+
ProtectKernelTunables=no
7+
NoNewPrivileges=no
8+
ProtectKernelLogs=no
9+
ProtectKernelModules=no
10+
PrivateTmp=no
11+
PrivateDevices=no
12+
ProtectHome=no
13+
ProtectSystem=no
14+
RestrictNamespaces=no
15+
LockPersonality=no
16+
RestrictRealtime=no
17+
ReadWritePaths=
18+
ReadOnlyPaths=
19+
ImportCredential=

‎fedora/45-toolbox/Dockerfile‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM quay.io/fedora/fedora:45
2+
3+
COPY --chown=0:0 --chmod=0644 \
4+
dnf.conf /etc/dnf/dnf.conf
5+
6+
RUN --mount=type=bind,source=extra-packages,target=/extra-packages \
7+
set -ex ; \
8+
dnf -y swap glibc-minimal-langpack glibc-langpack-en ; \
9+
dnf -y swap coreutils-single coreutils-full ; \
10+
dnf install -y --setopt=install_weak_deps=False $(paste extra-packages) ; \
11+
dnf clean all

‎fedora/45-toolbox/README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## General informations
2+
3+
Custom Fedora 45 container image for creating a sandbox environment with utilities such as [toolbx](https://github.com/containers/toolbox) or [distrobox](https://github.com/89luca89/distrobox).
4+
5+
## How to run this image ?
6+
7+
You can use `distrobox` to launch the sandbox using this image:
8+
9+
```shell
10+
$ distrobox create -i ghcr.io/f-bn/fedora:44-toolbox [options]
11+
```

‎fedora/45-toolbox/dnf.conf‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main]
2+
max_parallel_downloads=10
3+
defaultyes=True

0 commit comments

Comments
 (0)