Skip to content

Commit

Permalink
Merge pull request #5 from m2Giles/quadlets-systemd
Browse files Browse the repository at this point in the history
feat: quadlets and systemd service files for distrobox containers
  • Loading branch information
m2Giles authored Jan 14, 2024
2 parents 7cd0442 + d708513 commit 407c520
Show file tree
Hide file tree
Showing 14 changed files with 249 additions and 0 deletions.
1 change: 1 addition & 0 deletions quadlets/bluefin-cli/bluefin-cli-Cellar.volume
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Volume]
45 changes: 45 additions & 0 deletions quadlets/bluefin-cli/bluefin-cli-distrobox-quadlet.container
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[Unit]
Description=Bluefin CLI, leveraging Wolfi to provide you brew

[Container]
Annotation=run.oci.keep_original_groups=1
AutoUpdate=registry
ContainerName=bluefin-cli-distrobox-quadlet
Environment=SHELL=%s
Environment=HOME=%h
Environment=XDG_RUNTIME_DIR=%t
Environment=USER=%u
Environment=USERNAME=%u
Environment=container=podman
Exec=--verbose --name %u --user %U --group %G --home %h --init "0" --nvidia "1" --pre-init-hooks "" --additional-packages "" -- ""
Image=ghcr.io/ublue-os/bluefin-cli:latest
HostName=bluefin-cli-distrobox-quadlet.%l
Network=host
PodmanArgs=--entrypoint /usr/bin/entrypoint
PodmanArgs=--ipc host
PodmanArgs=--label com.github.containers.toolbox=true
PodmanArgs=--label manager=distrobox
PodmanArgs=--no-hosts
PodmanArgs=--privileged
PodmanArgs=--security-opt label=disable
PodmanArgs=--security-opt apparmor=unconfined
Ulimit=host
User=root:root
UserNS=keep-id
Volume=/:/run/host:rslave
Volume=/tmp:/tmp:rslave
Volume=/usr/bin/distrobox-init:/usr/bin/entrypoint:ro
Volume=/usr/bin/distrobox-export:/usr/bin/distrobox-export:ro
Volume=/usr/bin/distrobox-host-exec:/usr/bin/distrobox-host-exec:ro
Volume=%h:%h:rslave
Volume=/dev:/dev:rslave
Volume=/sys:/sys:rslave
Volume=/dev/pts
Volume=/dev/null:/dev/ptmx
Volume=/sys/fs/selinux
Volume=/var/log/journal
Volume=/var/home/%u:/var/home/%u:rslave
Volume=%t:%t:rslave
Volume=/etc/hosts:/etc/hosts:ro
Volume=/etc/resolv.conf:/etc/resolv.conf:ro
Volume=bluefin-cli-Cellar.volume:/home/linuxbrew/.linuxbrew/Cellar
44 changes: 44 additions & 0 deletions quadlets/fedora-toolbox/fedora-distrobox-quadlet.container
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[Unit]
Description=Fedora Toolbox for your distrobox fun

[Container]
Annotation=run.oci.keep_original_groups=1
AutoUpdate=registry
ContainerName=fedora-distrobox-quadlet
Environment=SHELL=%s
Environment=HOME=%h
Environment=XDG_RUNTIME_DIR=%t
Environment=USER=%u
Environment=USERNAME=%u
Environment=container=podman
Exec=--verbose --name %u --user %U --group %G --home %h --init "0" --nvidia "1" --pre-init-hooks "" --additional-packages "" -- ""
Image=ghcr.io/ublue-os/fedora-toolbox:latest
HostName=fedora-toolbox.%l
Network=host
PodmanArgs=--entrypoint /usr/bin/entrypoint
PodmanArgs=--ipc host
PodmanArgs=--label com.github.containers.toolbox=true
PodmanArgs=--label manager=distrobox
PodmanArgs=--no-hosts
PodmanArgs=--privileged
PodmanArgs=--security-opt label=disable
PodmanArgs=--security-opt apparmor=unconfined
Ulimit=host
User=root:root
UserNS=keep-id
Volume=/:/run/host:rslave
Volume=/tmp:/tmp:rslave
Volume=/usr/bin/distrobox-init:/usr/bin/entrypoint:ro
Volume=/usr/bin/distrobox-export:/usr/bin/distrobox-export:ro
Volume=/usr/bin/distrobox-host-exec:/usr/bin/distrobox-host-exec:ro
Volume=%h:%h:rslave
Volume=/dev:/dev:rslave
Volume=/sys:/sys:rslave
Volume=/dev/pts
Volume=/dev/null:/dev/ptmx
Volume=/sys/fs/selinux
Volume=/var/log/journal
Volume=/var/home/%u:/var/home/%u:rslave
Volume=%t:%t:rslave
Volume=/etc/hosts:/etc/hosts:ro
Volume=/etc/resolv.conf:/etc/resolv.conf:ro
44 changes: 44 additions & 0 deletions quadlets/ubuntu-toolbox/ubuntu-distrobox-quadlet.container
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[Unit]
Description=Ubuntu Toolbox for your distrobox fun

[Container]
Annotation=run.oci.keep_original_groups=1
AutoUpdate=registry
ContainerName=ubuntu-distrobox-quadlet
Environment=SHELL=%s
Environment=HOME=%h
Environment=XDG_RUNTIME_DIR=%t
Environment=USER=%u
Environment=USERNAME=%u
Environment=container=podman
Exec=--verbose --name %u --user %U --group %G --home %h --init "0" --nvidia "1" --pre-init-hooks "" --additional-packages "" -- ""
Image=ghcr.io/ublue-os/ubuntu-toolbox:latest
HostName=ubuntu-toolbox.%l
Network=host
PodmanArgs=--entrypoint /usr/bin/entrypoint
PodmanArgs=--ipc host
PodmanArgs=--label com.github.containers.toolbox=true
PodmanArgs=--label manager=distrobox
PodmanArgs=--no-hosts
PodmanArgs=--privileged
PodmanArgs=--security-opt label=disable
PodmanArgs=--security-opt apparmor=unconfined
Ulimit=host
User=root:root
UserNS=keep-id
Volume=/:/run/host:rslave
Volume=/tmp:/tmp:rslave
Volume=/usr/bin/distrobox-init:/usr/bin/entrypoint:ro
Volume=/usr/bin/distrobox-export:/usr/bin/distrobox-export:ro
Volume=/usr/bin/distrobox-host-exec:/usr/bin/distrobox-host-exec:ro
Volume=%h:%h:rslave
Volume=/dev:/dev:rslave
Volume=/sys:/sys:rslave
Volume=/dev/pts
Volume=/dev/null:/dev/ptmx
Volume=/sys/fs/selinux
Volume=/var/log/journal
Volume=/var/home/%u:/var/home/%u:rslave
Volume=%t:%t:rslave
Volume=/etc/hosts:/etc/hosts:ro
Volume=/etc/resolv.conf:/etc/resolv.conf:ro
44 changes: 44 additions & 0 deletions quadlets/wolfi-toolbox/wolfi-distrobox-quadlet.container
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[Unit]
Description=Wolfi Toolbox for your distrobox fun

[Container]
Annotation=run.oci.keep_original_groups=1
AutoUpdate=registry
ContainerName=wofli-distrobox-quadlet
Environment=SHELL=%s
Environment=HOME=%h
Environment=XDG_RUNTIME_DIR=%t
Environment=USER=%u
Environment=USERNAME=%u
Environment=container=podman
Exec=--verbose --name %u --user %U --group %G --home %h --init "0" --nvidia "1" --pre-init-hooks "" --additional-packages "" -- ""
Image=ghcr.io/ublue-os/wolfi-toolbox:latest
HostName=wolfi-toolbox.%l
Network=host
PodmanArgs=--entrypoint /usr/bin/entrypoint
PodmanArgs=--ipc host
PodmanArgs=--label com.github.containers.toolbox=true
PodmanArgs=--label manager=distrobox
PodmanArgs=--no-hosts
PodmanArgs=--privileged
PodmanArgs=--security-opt label=disable
PodmanArgs=--security-opt apparmor=unconfined
Ulimit=host
User=root:root
UserNS=keep-id
Volume=/:/run/host:rslave
Volume=/tmp:/tmp:rslave
Volume=/usr/bin/distrobox-init:/usr/bin/entrypoint:ro
Volume=/usr/bin/distrobox-export:/usr/bin/distrobox-export:ro
Volume=/usr/bin/distrobox-host-exec:/usr/bin/distrobox-host-exec:ro
Volume=%h:%h:rslave
Volume=/dev:/dev:rslave
Volume=/sys:/sys:rslave
Volume=/dev/pts
Volume=/dev/null:/dev/ptmx
Volume=/sys/fs/selinux
Volume=/var/log/journal
Volume=/var/home/%u:/var/home/%u:rslave
Volume=%t:%t:rslave
Volume=/etc/hosts:/etc/hosts:ro
Volume=/etc/resolv.conf:/etc/resolv.conf:ro
1 change: 1 addition & 0 deletions systemd/bluefin-cli/bluefin-cli-Cellar.volume
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Volume]
9 changes: 9 additions & 0 deletions systemd/bluefin-cli/bluefin-cli-distrobox-oneshot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Bluefin-CLI, a wolfi container to provide you your brew
Wants=bluefin-cli-Cellar

[Service]
Type=oneshot
ExecStart=/usr/bin/distrobox assemble create --replace -f /etc/distrobox/distrobox.ini -n bluefin-cli
ExecStart=/usr/bin/distrobox enter bluefin-cli
RemainAfterExit=true
10 changes: 10 additions & 0 deletions systemd/bluefin-cli/bluefin-cli-distrobox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[bluefin-cli]
image=ghcr.io/ublue-os/bluefin-cli
init=false
pull=false
nvidia=true
volume=systemd-bluefin-cli-Cellar:/home/linuxbrew/.linuxbrew/Cellar
init_hooks=""
additional_packages=""
pre_init_hooks=""
start_now=true
8 changes: 8 additions & 0 deletions systemd/fedora-toolbox/fedora-distrobox-oneshot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Fedora Toolbox for your distrobox fun

[Service]
Type=oneshot
ExecStart=/usr/bin/distrobox assemble create --replace -f /etc/distrobox/distrobox.ini -n fedora-toolbox
ExecStart=/usr/bin/distrobox enter fedora-toolbox
RemainAfterExit=true
9 changes: 9 additions & 0 deletions systemd/fedora-toolbox/fedora-distrobox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[fedora-toolbox]
image=ghcr.io/ublue-os/fedora-toolbox:latest
init=false
pull=false
nvidia=true
init_hooks=""
additional_packages=""
pre_init_hooks=""
start_now=true
8 changes: 8 additions & 0 deletions systemd/ubuntu-toolbox/ubuntu-distrobox-oneshot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Wolfi Toolbox for your distrobox fun

[Service]
Type=oneshot
ExecStart=/usr/bin/distrobox assemble create --replace -f /etc/distrobox/distrobox.ini -n wolfi-toolbox
ExecStart=/usr/bin/distrobox enter wolfi-toolbox
RemainAfterExit=true
9 changes: 9 additions & 0 deletions systemd/ubuntu-toolbox/ubuntu-distrobox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[ubuntu-toolbox]
image=ghcr.io/ublue-os/ubuntu-toolbox:latest
init=false
pull=false
nvidia=true
init_hooks=""
additional_packages=""
pre_init_hooks=""
start_now=true
8 changes: 8 additions & 0 deletions systemd/wolfi-toolbox/wolfi-distrobox-oneshot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Ubuntu Toolbox for your distrobox fun

[Service]
Type=oneshot
ExecStart=/usr/bin/distrobox assemble create --replace -f /etc/distrobox/distrobox.ini -n ubuntu-toolbox
ExecStart=/usr/bin/distrobox enter ubuntu-toolbox
RemainAfterExit=true
9 changes: 9 additions & 0 deletions systemd/wolfi-toolbox/wolfi-distrobox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wolfi-toolbox]
image=ghcr.io/ublue-os/wolfi-toolbox:latest
init=false
pull=false
nvidia=true
init_hooks=""
additional_packages=""
pre_init_hooks=""
start_now=true

0 comments on commit 407c520

Please sign in to comment.