cmd

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Cmd backup copies docker-machine certs and configurations to S3

Cmd build generates docker images, using templates, and pushes them to a registry

Cmd compose is a passthru for `docker compose` command that supports templates

Cmd restore copies docker-machine certs and configurations from S3 and applies them to the host

Index

Constants

This section is empty.

Variables

View Source
var BuildImageDirname string = "."

BuildImageDirname tells the tool which directory to itereate through to find Dockerfiles. defaults the present working directory, but a good practice is to mint a .mach.yaml and set this to `images` or the like when building an IaC repo.

View Source
var BuildVariantFromParam string = ""

add build tag

View Source
var ComposeDirname = "."

ComposeDirname is the bas directory for compositions, could be set to `composes` in .mach.yaml

View Source
var CreateBucketFirst bool = false

CreateBucketFirst will trigger the creation of a bucket before a backup, triggered with cli flag `-c` or `--create`

View Source
var DefaultGitBranch string = "main"

DefaultGitBranch allows for setting which branch does not add a branch variant to the tag. Default to main, consider changing your branch name before chaning this default.

View Source
var DockerHost string = "https://index.docker.io/v1/"

DockerHost is the URL for the docker registry, we default to the offical registry, but this can be changed in config to any registry you like.

View Source
var DockerPassword string = ""

DockerPassword is the registry password

View Source
var DockerRegistry string = "superterran/mach"

DockerRegistry is the package name inside the docker registry. @todo think through a better name

View Source
var DockerUser string = ""

DockerUser is the registry username

View Source
var FirstOnly bool = false

FirstOnly will stop the build loop after the first image is found, useful for output only

View Source
var HomeDir string
View Source
var KeepTarball bool = false

KeepTarball will trigger a clean-up of the tarball, set to true to prevent, or `-k` or `--keep-tarball`

View Source
var MachineS3Bucket string = "mach-docker-machine-certificates"

MachineS3Bucket defines which bucket mach interacts with for storing config tarballs, pulled from `machine-s3-bucket` in .mach.conf.yaml

View Source
var MachineS3Region string = "us-east-1"

MachineS3Region defines which region the bucket is in, pulled from `machine-s3-region` in .mach.conf.yaml

View Source
var NoCache bool = false

builds docker images without cache

View Source
var Nopush bool = false

Nopush builds the image, but does not push to a registry. Set with `--no-push` or `-n`

View Source
var OutputOnly = false

OutputOnly will break execution of the build tool and will post the generated dockerfile template to stdout invoke with `-o` or `--outout-only`

View Source
var TestMode = false

TestMode var determines if certain flows actually complete or not for unit testing

View Source
var Verbose bool = false

Verbose removes the terminal formatting for builds, displaying the entire output to the user

Functions

func CreateBackupCmd added in v0.5.0

func CreateBackupCmd() *cobra.Command

func CreateBuildCmd added in v0.5.0

func CreateBuildCmd() *cobra.Command

func CreateComposeCmd added in v0.5.0

func CreateComposeCmd() *cobra.Command

func CreateRestoreCmd added in v0.5.0

func CreateRestoreCmd() *cobra.Command

func CreateRootCmd added in v0.5.2

func CreateRootCmd() *cobra.Command

func Execute

func Execute()

func InitConfig added in v0.5.13

func InitConfig()

func MainBuildFlow added in v0.5.0

func MainBuildFlow(args []string) error

MainBuildFlow will run builds against an array of arguments, if no arguments are supplied it will iterate through the build directory

func MainComposeFlow added in v0.5.0

func MainComposeFlow(args []string) error

MainComposeFlow builds and runs compositions against an array of arguments. If none are passed, it will iterate through all compositons in the compose dir

func RunCompose added in v0.5.0

func RunCompose(composition string, args []string)

RunCompose is a wrapper for `docker-compose`. It requires `docker-compose` installed locally, and the command is invoked from the directory of the composition. When running commands, pass flags to docker-composer with --, i.e. `mach compose satis up -- -d --force-recreate`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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