docker

package module
v0.0.0-...-75dcc22 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainerEnvVar

func NewContainerEnvVar(name, value string) (string, error)

NewContainerEnvVar creates a new instance of ContainerEnvVar given a name and value.

func RemoveServer

func RemoveServer(ctx context.Context) error

RemoveServer stops and removes a server container.

func RunServer

func RunServer(ctx context.Context, config ContainerConfig) (container.CreateResponse, error)

RunServer creates a server container and starts it. Similar to `docker run`.

Types

type ContainerConfig

type ContainerConfig struct {
	Name         string
	Image        string
	ExposedPorts nat.PortSet
	Binds        []string
	Env          []string
}

ContainerConfig is a set of configurations to pass to the docker engine to create the server container.

func NewContainerConfig

func NewContainerConfig(name string, gameSchema schema.Schema, server types.Server) (ContainerConfig, error)

NewContainerConfig creates a new ContainerConfig from a name, game schema and a server.

Jump to

Keyboard shortcuts

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