podman

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFPMImage added in v0.1.14

func BuildFPMImage(version string) error

BuildFPMImage builds the lerd PHP-FPM image for the given version if it doesn't exist. Prints build output to stdout so the user can see progress.

func ContainerExists

func ContainerExists(name string) (bool, error)

ContainerExists returns true if the named container exists (running or not).

func ContainerRunning

func ContainerRunning(name string) (bool, error)

ContainerRunning returns true if the named container is running.

func ContainerfileHash added in v0.1.25

func ContainerfileHash() (string, error)

ContainerfileHash returns the SHA-256 hash of the embedded PHP-FPM Containerfile. This is used to detect when images need to be rebuilt after a lerd update.

func DaemonReload

func DaemonReload() error

DaemonReload runs systemctl --user daemon-reload.

func EnsureNetwork

func EnsureNetwork(name string) error

EnsureNetwork creates the named Podman network if it does not already exist.

func GetQuadletTemplate

func GetQuadletTemplate(name string) (string, error)

GetQuadletTemplate returns the content of a named quadlet template file.

func NeedsFPMRebuild added in v0.1.25

func NeedsFPMRebuild() bool

NeedsFPMRebuild returns true if the stored Containerfile hash differs from the current embedded Containerfile, meaning images should be rebuilt.

func NetworkGateway added in v0.1.14

func NetworkGateway(name string) string

NetworkGateway returns the gateway IP of the named Podman network. Falls back to "127.0.0.1" if it cannot be determined.

func QuadletInstalled added in v0.1.17

func QuadletInstalled(name string) bool

QuadletInstalled returns true if a quadlet .container file exists for the given unit name.

func RebuildFPMImage added in v0.1.17

func RebuildFPMImage(version string) error

RebuildFPMImage force-removes and rebuilds the PHP-FPM image for the given version.

func RemoveQuadlet

func RemoveQuadlet(name string) error

RemoveQuadlet removes a Podman quadlet container unit file.

func RestartUnit

func RestartUnit(name string) error

RestartUnit restarts a systemd user unit.

func Run

func Run(args ...string) (string, error)

Run executes podman with the given arguments and returns stdout.

func RunSilent

func RunSilent(args ...string) error

RunSilent executes podman with the given arguments, discarding output.

func StartUnit

func StartUnit(name string) error

StartUnit starts a systemd user unit.

func StopUnit

func StopUnit(name string) error

StopUnit stops a systemd user unit.

func StoreFPMHash added in v0.1.25

func StoreFPMHash() error

StoreFPMHash writes the current Containerfile hash to disk.

func UnitStatus

func UnitStatus(name string) (string, error)

UnitStatus returns the active state of a systemd user unit.

func WriteFPMQuadlet added in v0.4.0

func WriteFPMQuadlet(version string) error

WriteFPMQuadlet writes (or overwrites) the systemd quadlet for a PHP-FPM version and reloads the systemd daemon. It also ensures the xdebug ini file exists.

func WriteQuadlet

func WriteQuadlet(name, content string) error

WriteQuadlet writes a Podman quadlet container unit file.

func WriteXdebugIni added in v0.4.0

func WriteXdebugIni(version string, enabled bool) error

WriteXdebugIni writes the per-version xdebug ini to the host config dir. The file is volume-mounted into the FPM container at /usr/local/etc/php/conf.d/99-xdebug.ini.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL