docker

package
v3.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cp

func Cp(tagForLog string, from string, containerID string, to string) error

func Exec added in v3.1.0

func Exec(containerID string, command ...string) (string, error)

`docker exec` コマンドを実行する。

func GetContainerIDFromWorkspaceFolder

func GetContainerIDFromWorkspaceFolder(workspaceFolder string) (string, error)

workspaceFolder で指定したディレクトリに対応するコンテナのコンテナ ID を返却する

func GetID

func GetID(psCommandResult string) (string, error)

func Ps

func Ps(filter string) (string, error)

`docker ps --format json` コマンドを実行する。

func Rm

func Rm(containerID string) error

`docker rm -f ${containerID}` コマンドを実行する。

func Stop

func Stop(containerID string) error

`docker stop -f ${containerID}` コマンドを実行する。

Types

type ContainerNotFoundError

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

func (*ContainerNotFoundError) Error

func (e *ContainerNotFoundError) Error() string

type PsCommandResult

type PsCommandResult struct {
	ID string `json:"ID"`
}

`docker ps --format json` コマンドの実行結果スキーマ

Example:

{
}

func UnmarshalPsCommandResult

func UnmarshalPsCommandResult(data []byte) (PsCommandResult, error)

Jump to

Keyboard shortcuts

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