gearboxworks / launch

Running in Docker made trivial
2 stars 0 forks source link
docker docker-containers execution installer remote-execution

Gearbox

About launch

Launch simplifies running Docker containers.

It provides five (5) important functional areas, without any Docker container learning curve:

  1. Allows for "install" of applications as though natively installed.
  2. Allows control over "Launchified" Docker containers: stop, start, create, remove.
  3. Build, update, modify and release "Launchified" Docker images.
  4. Acts as a proxy for interactive commands within a Gearbox Docker container.
  5. Can even run applications that are installed on remote computers!

It also provides a functional SSH daemon for connecting remotely as well as a standard set of common tools and utilities.

Download launch

launch is currently in beta testing and is included along with all Gearbox Docker repos. Once out of beta, it will be included within the Gearbox installation package.

For now, simply download the standalone launch binary for your O/S. Mac OSX Linux Linux Windows Windows SBC SBC
Mac OSX Mac OSX 64bit Linux Linux 64bit Linux Linux 32bit Windows Windows 64bit Windows Windows 32bit Raspberry Pi Raspberry Pi 32bit SBC SBC 64bit

Usage

Description: launch - Gearbox gear launcher.

Usage:

launch [flags] [command] <gear name>

Top level commands

Where launch [command] is one of the below commands.

Basic commands

version     - Guru      - launch - Self-manage this executable.
search      - Manage    - Search for available Launch Container
list        - Manage    - List a Launch Container
run     - Execute   - Run default Launch Container command
shell       - Execute   - Execute shell in Launch Container

Manage

search      - Manage    - Search for available Launch Container
list        - Manage    - List a Launch Container
install     - Manage    - Install a Launch Container
uninstall   - Manage    - Uninstall a Launch Container
update      - Manage    - Update a Launch Container
clean       - Manage    - Completely uninstall a Launch Container
log     - Manage    - Show logs of Launch Container
start       - Manage    - Start a Launch Container
stop        - Manage    - Stop a Launch Container

Run

run     - Execute   - Run default Launch Container command
shell       - Execute   - Execute shell in Launch Container

Help

help        - Help      - Help about any command.
assist      - Help      - Show additional help
assist flags    - Help      - Show additional flags
assist examples - Help      - Show examples
assist basic    - Help      - Show basic help
assist advanced - Help      - Show advanced help
assist all  - Help      - Show all help

Build commands

Where launch build [command] is one of the below commands.

Building & creation

create      - Build     - Build a Launch Container
test        - Build     - Execute unit tests in Launch Container
publish     - Build     - Publish a Launch Container
clean       - Build     - Remove a Launch Container build
export      - Build     - Save state of a Launch Container
import      - Build     - Load a Launch Container 

Guru commands

Where launch [command] is one of the below commands.

scribe      - Guru      - scribe - The ultimate scripting toolkit.
version     - Guru      - launch - Self-manage this executable. 
completion  - Guru      - Generate BASH completion file

Flags

Provider flags

--provider string   Set virtual provider (default "docker")
--host string       Set virtual provider host.
--port string       Set virtual provider port.

Runtime flags

-d, --debug     Debug mode.
-n, --no-create     Don't create container.
-q, --quiet     Silence all launch messages.
-t, --temporary     Temporary container - remove after running command.
--tmp string        Alternate TMP dir mount point. (default "none")
-v, --version       Display version of launch

Interactive shell flags

-s, --status        Show shell status line.

Mounting flags

-m, --mount string  Mount arbitrary directory via SSHFS. (default "none")
-p, --project string    Mount project directory. (default "none")

Running launch

GoLang

Building a simple GoLang application with multiple versions.

GoLang

Imagemagick

Identify and resize a plain PNG file.

Imagemagick

Mountebank

Install and run latest version of Mountebank with one command!

Mountebank1

Install latest version of Mountebank and use the builtin command mb.

Mountebank2

Launch on Windows

Prefer Windows? Sure, launch has you covered.

Mountebank3

Using a remote Docker instance

Don't have Docker installed on your machine? Set the DOCKER_HOST environment variable and you have complete access as though it's installed locally.

Mountebank3

Further examples

There are many ways to call launch, either directly or indirectly. Additionally, all host environment variables will be imported into the container seamlessly. This allows a devloper to try multiple versions of software as though they were installed locally.

If a container is missing, it will be downloaded and created. Multiple versions can co-exist.

Install, create, and start the gearbox-base Gearbox container.

launch install golang

Create, and start the gearbox-base Gearbox container. Run a shell.

launch shell golang

Create, and start the gearbox-base Gearbox container with version alpine-3.4 and run a shell.

launch shell golang:latest

launch shell golang:1.20 ls -l

launch shell golang:1.11.1 ps -eaf

Available commands

If gearbox-base is symlinked to launch, then the Gearbox container will be determined automatically and the default command will be run. All available commands for a Gearbox container will be automatically symlinked upon installation.

go

Running gearbox-base Gearbox container default command. If a container has a default interactive command, arguments can be supplied without specifying that command.

go -flag1 -flag2 variable

launch run golang -flag1 -flag2 variable

Gearbox containers may have multiple executables that can be run. These will be automatically made available when you install a launch container.

Remote Docker

You don't have to have Docker installed on your PC! As long as you set the DOCKER_HOST environment variable, then launch will use the remote Docker instance!

Remote connection

ssh - All Gearbox containers have a running SSH daemon. So you can connect remotely. To show what ports are exported to the host, use the following command.

launch list ports