libpod

package
v0.0.0-...-8528295 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerCreate

func ContainerCreate(cr *common.ContextRouter, c *gin.Context)

ContainerCreate - create a container. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerCreateLibpod POST "/libpod/containers/create"

func ContainerDelete

func ContainerDelete(cr *common.ContextRouter, c *gin.Context)

ContainerDelete - remove a container. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerDeleteLibpod DELETE "/libpod/containers/:id"

func ContainerExists

func ContainerExists(cr *common.ContextRouter, c *gin.Context)

ContainerExists - Check if container exists. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerExistsLibpod GET "/libpod/containers/:id/exists"

func ContainerInfo

func ContainerInfo(cr *common.ContextRouter, c *gin.Context)

ContainerInfo - return low-level information about a container. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerInspectLibpod GET "/libpod/containers/:id/json"

func ContainerList

func ContainerList(cr *common.ContextRouter, c *gin.Context)

ContainerList - returns a list of containers. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerListLibpod GET "/libpod/containers/json"

func ContainerWait

func ContainerWait(cr *common.ContextRouter, c *gin.Context)

ContainerWait - Block until a container stops, then returns the exit code. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerWaitLibpod POST "/libpod/containers/:id/wait"

func ImagePull

func ImagePull(cr *common.ContextRouter, c *gin.Context)

ImagePull - pull one or more images from a container registry. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/images/operation/ImagePullLibpod POST "/libpod/images/pull"

func Ping

func Ping(cr *common.ContextRouter, c *gin.Context)

Ping - dummy endpoint you can use to test if the server is accessible. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/system/operation/SystemPing GET "/libpod/_ping"

Types

type ContainerCreateRequest

type ContainerCreateRequest struct {
	Name         string                      `json:"name"`
	Image        string                      `json:"image"`
	Labels       map[string]string           `json:"Labels"`
	Entrypoint   []string                    `json:"Entrypoint"`
	Command      []string                    `json:"Command"`
	Env          map[string]string           `json:"Env"`
	User         string                      `json:"User"`
	PortMappings []PortMapping               `json:"portmappings"`
	Network      map[string]NetworksProperty `json:"Networks"`
	Mounts       []Mount                     `json:"mounts"`
}

ContainerCreateRequest represents the json structure that is used for the /libpod/container/create post endpoint.

type Mount

type Mount struct {
	Source      string `json:"source"`
	Destination string `json:"destination"`
	Type        string `json:"type"`
}

Mount describes how volumes should be mounted.

type NetworksProperty

type NetworksProperty struct {
	Aliases []string `json:"aliases"`
}

NetworksProperty describes the container networks.

type PortMapping

type PortMapping struct {
	ContainerPort int    `json:"container_port"`
	HostIP        string `json:"host_ip"`
	HostPort      int    `json:"host_port"`
	Protocol      string `json:"protocol"`
	Range         int    `json:"range"`
}

PortMapping describes how to map a port into the container.

Jump to

Keyboard shortcuts

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