docker

package
v0.0.0-...-9d99875 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-2.0 Imports: 18 Imported by: 0

README

Docker Module P2P-rendering-computation 
========================================

This module is incharge to spin up docker contaianers , create 
SSH server and VNC server. This module is implemented using 
python. 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopAndRemoveContainer

func StopAndRemoveContainer(containername string) error

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

Types

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"`
	SSHPassword string `json:"SSHPassword"`
	ID          string `json:"ID"`
	TagName     string `json:"TagName"`
	ImagePath   string `json:"ImagePath"`
	Ports       Ports  `json:"Ports"`
	GPU         string `json:"GPU"`
}

func BuildRunContainer

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

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

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)

Jump to

Keyboard shortcuts

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