docker_runner

package
v0.0.0-...-31148e1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerExecutor

type DockerExecutor struct {
	Status       chan bool // syncronization for executor
	DockerClient *client.Client
}

DockerExecutor - главный исполняющий модуль заданий связанных с докером

func NewDockerExecutor

func NewDockerExecutor() (*DockerExecutor, error)

NewDockerExecutor - создание нового докер исполнителя

func (*DockerExecutor) CreateContainer

func (docker *DockerExecutor) CreateContainer(payload *models.ContainerCreatePayload) (string, error)

CreateContainer - function for creating new container with docker file such as json

func (*DockerExecutor) CreateImageMem

func (docker *DockerExecutor) CreateImageMem(dockerFile, shell, tags []string, neededPath map[string]string) ([]string, error)

CreateImageMem - создание образа по заданному dockerfile с заданными инструкциями для выполнения + пометка образа списком тэгов

func (*DockerExecutor) PrepareDockerEnv

func (docker *DockerExecutor) PrepareDockerEnv(neededPath map[string]string, dockerFile, shell []string) error

PrepareDockerEnv - подготовка докер файла для его сборки

func (*DockerExecutor) PullImage

func (docker *DockerExecutor) PullImage(image string) error

PullImage - пуллинг публичных образов

func (*DockerExecutor) RemoveContainer

func (docker *DockerExecutor) RemoveContainer(containerName string) error

RemoveContainer - удаление контейнера

func (*DockerExecutor) RemoveImage

func (docker *DockerExecutor) RemoveImage(imageName string) error

RemoveImage - удаление образа

func (*DockerExecutor) RunContainer

func (docker *DockerExecutor) RunContainer(containerID string, timeout int64) (io.ReadCloser, error)

RunContainer - запуск контейнера

Jump to

Keyboard shortcuts

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