Documentation ¶
Index ¶
- Constants
- Variables
- type DockerService
- func (s *DockerService) Connect()
- func (s *DockerService) CreateContainer(name string, cmd []string) (resp container.ContainerCreateCreatedBody, err error)
- func (s *DockerService) GetContainer(containerId string) (ret types.Container, err error)
- func (s *DockerService) GetContainerInfo(containerId string) (ret commDomain.ContainerInfo, err error)
- func (s *DockerService) GetContainerLog(containerId string) (ret string, err error)
- func (s *DockerService) GetImage(imageId string) (ret types.ImageSummary, err error)
- func (s *DockerService) ListContainer() (containers []types.Container, err error)
- func (s *DockerService) ListImage() (images []types.ImageSummary, err error)
- func (s *DockerService) PullImage(refStr string) (err error)
- func (s *DockerService) RemoveContainer(containerId string, removeVolumes, removeLinks, force bool) (err error)
- func (s *DockerService) StartContainer(containerId string) (err error)
- func (s *DockerService) StopContainer(containerId string) (err error)
Constants ¶
View Source
const (
DockerConnStrRemote = "ssh://%s@%s:22"
)
Variables ¶
View Source
var ( DockerCtx context.Context DockerClient *client.Client )
Functions ¶
This section is empty.
Types ¶
type DockerService ¶
type DockerService struct { }
func NewDockerService ¶
func NewDockerService() *DockerService
func (*DockerService) Connect ¶
func (s *DockerService) Connect()
func (*DockerService) CreateContainer ¶
func (s *DockerService) CreateContainer(name string, cmd []string) (resp container.ContainerCreateCreatedBody, err error)
func (*DockerService) GetContainer ¶
func (s *DockerService) GetContainer(containerId string) (ret types.Container, err error)
func (*DockerService) GetContainerInfo ¶
func (s *DockerService) GetContainerInfo(containerId string) (ret commDomain.ContainerInfo, err error)
func (*DockerService) GetContainerLog ¶
func (s *DockerService) GetContainerLog(containerId string) (ret string, err error)
func (*DockerService) GetImage ¶
func (s *DockerService) GetImage(imageId string) (ret types.ImageSummary, err error)
func (*DockerService) ListContainer ¶
func (s *DockerService) ListContainer() (containers []types.Container, err error)
func (*DockerService) ListImage ¶
func (s *DockerService) ListImage() (images []types.ImageSummary, err error)
func (*DockerService) PullImage ¶
func (s *DockerService) PullImage(refStr string) (err error)
func (*DockerService) RemoveContainer ¶
func (s *DockerService) RemoveContainer(containerId string, removeVolumes, removeLinks, force bool) (err error)
func (*DockerService) StartContainer ¶
func (s *DockerService) StartContainer(containerId string) (err error)
func (*DockerService) StopContainer ¶
func (s *DockerService) StopContainer(containerId string) (err error)
Click to show internal directories.
Click to hide internal directories.