-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
DevOps/Infrastructure-Solutions/Container/Podman/podman-quadlets.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |