Documentation ¶
Index ¶
- Constants
- type Docker
- func (d *Docker) ExecCommand(ctx context.Context, cmd []string) error
- func (d *Docker) IsRunning() bool
- func (d *Docker) PullImage(ctx context.Context, imageURI string) error
- func (d *Docker) RunContainer(ctx context.Context, imageURI, volumeHostDir string) error
- func (d *Docker) StopContainer(ctx context.Context) error
Constants ¶
View Source
const VolumeContainerDir = "/vol"
VolumeContainerDir is the path inside the container to the Docker volume.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker executes docker CLI commands to make and manage a single container.
func (*Docker) ExecCommand ¶
ExecCommand runs a command inside a running container. The container must have already been started with StartContainer().
func (*Docker) RunContainer ¶
RunContainer starts a Docker container process containing a new Docker volume. volumeHostDir is the path in the host filesystem that will be bound as the volume in the container, e.g. host:/tmp/dir may be bound as container:/vol
Click to show internal directories.
Click to hide internal directories.