Files
p2p-rendering-computation/server/docker/docs.md

5.2 KiB

docker

import "github.com/Akilan1999/p2p-rendering-computation/server/docker"

Index

func StopAndRemoveContainer

func StopAndRemoveContainer(containername string) error

StopAndRemoveContainer Stop and remove a container Reference (https://gist.github.com/frikky/e2efcea6c733ea8d8d015b7fe8a91bf6)

type DockerContainer

type DockerContainer struct {
    ContainerName        string `json:"DockerContainerName"`
    ContainerDescription string `json:"ContainerDescription"`
}

type DockerContainers

type DockerContainers struct {
    DockerContainer []DockerContainer `json:"DockerContainer"`
}

func ViewAllContainers

func ViewAllContainers() (*DockerContainers, error)

ViewAllContainers returns all containers runnable and which can be built

type DockerVM

type DockerVM struct {
    SSHUsername string `json:"SSHUsername"`
    SSHPublcKey string `json:"SSHPublicKey"`
    ID          string `json:"ID"`
    TagName     string `json:"TagName"`
    ImagePath   string `json:"ImagePath"`
    Ports       Ports  `json:"Ports"`
    GPU         string `json:"GPU"`
    TempPath    string
    BaseImage   string
    LogsPath    string
    SSHCommand  string `json:"SSHCommand"`
}

func BuildRunContainer

func BuildRunContainer(NumPorts int, GPU string, ContainerName string, baseImage string, publicKey string) (*DockerVM, error)

BuildRunContainer Function is incharge to invoke building and running contianer and also allocating external ports

func (*DockerVM) CopyToTmpContainer

func (d *DockerVM) CopyToTmpContainer() error

CopyToTmpContainer Creates a copy of the docker folder

func (*DockerVM) TemplateDockerContainer

func (d *DockerVM) TemplateDockerContainer() error

TemplateDockerContainer This function templates the docker container with the base docker image to use

type ErrorDetail

type ErrorDetail struct {
    Message string `json:"message"`
}

type ErrorLine

type ErrorLine struct {
    Error       string      `json:"error"`
    ErrorDetail ErrorDetail `json:"errorDetail"`
}

type Port

type Port struct {
    PortName     string `json:"PortName"`
    InternalPort int    `json:"InternalPort"`
    Type         string `json:"Type"`
    ExternalPort int    `json:"ExternalPort"`
    IsUsed       bool   `json:"IsUsed"`
    Description  string `json:"Description"`
}

type Ports

type Ports struct {
    PortSet []Port `json:"Port"`
}

func OpenPortsFile

func OpenPortsFile(filename string) (*Ports, error)

Generated by gomarkdoc