initial commit
This commit is contained in:
32
pkg/containers/podman/podman.go
Normal file
32
pkg/containers/podman/podman.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package podman
|
||||
|
||||
// Client talks to Podman socket inside a container.
|
||||
type Client interface {
|
||||
List(ctID string) ([]OCIContainer, error)
|
||||
Create(ctID string, spec CreateSpec) (OCIContainer, error)
|
||||
Start(ctID, cid string) error
|
||||
Stop(ctID, cid string) error
|
||||
Delete(ctID, cid string) error
|
||||
}
|
||||
|
||||
type CreateSpec struct {
|
||||
Image string
|
||||
Cmd []string
|
||||
Env map[string]string
|
||||
Ports []PortMap
|
||||
Volumes []string
|
||||
Restart string
|
||||
}
|
||||
|
||||
type PortMap struct {
|
||||
HostPort int
|
||||
ContainerPort int
|
||||
}
|
||||
|
||||
type OCIContainer struct {
|
||||
ID string
|
||||
Image string
|
||||
Status string
|
||||
}
|
||||
|
||||
// TODO: connect via nsenter into CT and talk to Podman socket.
|
||||
Reference in New Issue
Block a user