docker

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 8 Imported by: 0

README

API

use package

import (
	"github.com/strapsi/go-docker"
)

types

type PsOptions struct {
	All bool
	FilterNames []string
}

type RunOptions struct {
	Image string
	Name string
	Force bool
	Env map[string]string
}

docker

// returns existing containers
docker.Ps(options *docker.PsOptions)

// create and start container
docker.Run(options *docker.RunOptions)

Changelog

v0.0.4

  • added environment variables for docker run
  • added force option to force an existing container to be removed
  • added filter by name option to docker ps

v0.0.3

  • added docker run command

v0.0.2

  • added docker ps command
  • removed test commands

v0.0.1

  • initialized package with test commands

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ps added in v0.0.3

func Ps(options *PsOptions) ([]_types.Container, error)

func Run added in v0.0.3

func Run(options *RunOptions) error

Types

type PsOptions added in v0.0.3

type PsOptions struct {
	All         bool
	FilterNames []string
}

type RunOptions added in v0.0.3

type RunOptions struct {
	Image string
	Name  string
	Force bool
	Env   map[string]string
	Ports map[string]string
}

Jump to

Keyboard shortcuts

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