mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
Merge pull request #27384 from flouthoc/multi-file-quadlet
quadlet install: add support for multiple quadlets in a single file
This commit is contained in:
@@ -16,7 +16,9 @@ This command allows you to:
|
||||
|
||||
* Specify a directory containing multiple Quadlet files and other non-Quadlet files for installation ( example a config file for a quadlet container ).
|
||||
|
||||
Note: If a quadlet is part of an application, removing that specific quadlet will remove the entire application. When a quadlet is installed from a directory, all files installed from that directory—including both quadlet and non-quadlet files—are considered part of a single application.
|
||||
* Install multiple Quadlets from a single file with the `.quadlets` extension, where each Quadlet is separated by a `---` delimiter. When using multiple quadlets in a single `.quadlets` file, each quadlet section must include a `# FileName=<name>` comment to specify the name for that quadlet.
|
||||
|
||||
Note: If a quadlet is part of an application, removing that specific quadlet will remove the entire application. When a quadlet is installed from a directory, all files installed from that directory—including both quadlet and non-quadlet files—are considered part of a single application. Similarly, when multiple quadlets are installed from a single `.quadlets` file, they are all considered part of the same application.
|
||||
|
||||
Note: In case user wants to install Quadlet application then first path should be the path to application directory.
|
||||
|
||||
@@ -59,5 +61,30 @@ $ podman quadlet install https://github.com/containers/podman/blob/main/test/e2e
|
||||
/home/user/.config/containers/systemd/basic.container
|
||||
```
|
||||
|
||||
Install multiple quadlets from a single .quadlets file
|
||||
```
|
||||
$ cat webapp.quadlets
|
||||
# FileName=web-server
|
||||
[Container]
|
||||
Image=nginx:latest
|
||||
ContainerName=web-server
|
||||
PublishPort=8080:80
|
||||
---
|
||||
# FileName=app-storage
|
||||
[Volume]
|
||||
Label=app=webapp
|
||||
---
|
||||
# FileName=app-network
|
||||
[Network]
|
||||
Subnet=10.0.0.0/24
|
||||
|
||||
$ podman quadlet install webapp.quadlets
|
||||
/home/user/.config/containers/systemd/web-server.container
|
||||
/home/user/.config/containers/systemd/app-storage.volume
|
||||
/home/user/.config/containers/systemd/app-network.network
|
||||
```
|
||||
|
||||
Note: Multi-quadlet functionality requires the `.quadlets` file extension. Files with other extensions will only be processed as single quadlets or asset files.
|
||||
|
||||
## SEE ALSO
|
||||
**[podman(1)](podman.1.md)**, **[podman-quadlet(1)](podman-quadlet.1.md)**, **[podman-systemd.unit(5)](podman-systemd.unit.5.md)**
|
||||
|
||||
Reference in New Issue
Block a user