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 ¶
- Variables
- func CreateBackupCmd() *cobra.Command
- func CreateBuildCmd() *cobra.Command
- func CreateComposeCmd() *cobra.Command
- func CreateRestoreCmd() *cobra.Command
- func CreateRootCmd() *cobra.Command
- func Execute()
- func InitConfig()
- func MainBuildFlow(args []string) error
- func MainComposeFlow(args []string) error
- func RunCompose(composition string, args []string)
Constants ¶
This section is empty.
Variables ¶
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.
var ComposeDirname = "."
ComposeDirname is the bas directory for compositions, could be set to `composes` in .mach.yaml
var CreateBucketFirst bool = false
CreateBucketFirst will trigger the creation of a bucket before a backup, triggered with cli flag `-c` or `--create`
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.
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.
var DockerPassword string = ""
DockerPassword is the registry password
var DockerRegistry string = "superterran/mach"
DockerRegistry is the package name inside the docker registry. @todo think through a better name
var DockerUser string = ""
DockerUser is the registry username
var FirstOnly bool = false
FirstOnly will stop the build loop after the first image is found, useful for output only
var HomeDir string
var KeepTarball bool = false
KeepTarball will trigger a clean-up of the tarball, set to true to prevent, or `-k` or `--keep-tarball`
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
var MachineS3Region string = "us-east-1"
MachineS3Region defines which region the bucket is in, pulled from `machine-s3-region` in .mach.conf.yaml
var NoCache bool = false
builds docker images without cache
var Nopush bool = false
Nopush builds the image, but does not push to a registry. Set with `--no-push` or `-n`
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`
var TestMode = false
TestMode var determines if certain flows actually complete or not for unit testing
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 CreateBuildCmd ¶ added in v0.5.0
func CreateComposeCmd ¶ added in v0.5.0
func CreateRestoreCmd ¶ added in v0.5.0
func CreateRootCmd ¶ added in v0.5.2
func InitConfig ¶ added in v0.5.13
func InitConfig()
func MainBuildFlow ¶ added in v0.5.0
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
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
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.