Skip to content

Commit

Permalink
fix: podman-quadlets with container
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxd committed Nov 11, 2023
1 parent 23bc163 commit e02a58d
Showing 1 changed file with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Podman Quadlets

## Pre-requisites

When using rootless podman a directory under the user's home directory must be created for the quadlet files.

```bash
mkdir -p ~/.config/containers/systemd
```

## Container

A container quadlet file must end with `.container` in the `~/.config/containers/systemd` directory.

Example quadlet file to run a deluge container (`deluge.container` file):

```systemd
[Install]
WantedBy=default.target
[Unit]
After=mullvadvpn.service
[Container]
Image=docker.io/linuxserver/deluge:latest
Volume=/opt/container/deluge/downloads/:/downloads
Volume=/opt/container/deluge/config/:/cofnig
[Service]
# Restart service when sleep finishes
Restart=always
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
```

All the options for the quadlet file can be found in the [podman documentation](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#container-units-container).

### Start

```bash
systemctl --user daemon-reload
systemctl --user start deluge
```

### Logs

```bash
podman logs systemd-deluge

journactl -f | grep deluge
```

## Pods

0 comments on commit e02a58d

Please sign in to comment.