mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
quadlet: Don't put @ in container names for templated units
This is not supported by podman, so we make "foo@bar" into "foo_bar". Signed-off-by: Alexander Larsson <alexl@redhat.com>
This commit is contained in:
@ -439,7 +439,11 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse
|
||||
containerName, ok := container.Lookup(ContainerGroup, KeyContainerName)
|
||||
if !ok || len(containerName) == 0 {
|
||||
// By default, We want to name the container by the service name
|
||||
containerName = "systemd-%N"
|
||||
if strings.Contains(container.Filename, "@") {
|
||||
containerName = "systemd-%P_%I"
|
||||
} else {
|
||||
containerName = "systemd-%N"
|
||||
}
|
||||
}
|
||||
|
||||
// Set PODMAN_SYSTEMD_UNIT so that podman auto-update can restart the service.
|
||||
|
Reference in New Issue
Block a user