docker

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cli dockerclient) *Client

func (*Client) BuildImage

func (c *Client) BuildImage(ctx context.Context) (string, error)

BuildImage builds a docker image

https://stackoverflow.com/a/46518557

func (*Client) RemoveContainer

func (c *Client) RemoveContainer(ctx context.Context, containerID string) error

func (*Client) RunContainer

func (c *Client) RunContainer(ctx context.Context, args RunContainerArgs) (string, error)

type RunArgs

type RunArgs struct {
	ExposedPort int
	Platform    string
	Handler     string
	SourcePath  string
}

type RunContainerArgs

type RunContainerArgs struct {
	ContainerName string
	ImageName     string
	Handler       string
	SourcePath    string
	Port          int
}

Jump to

Keyboard shortcuts

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