This is a clone of triton-docker-cli for use with the Spearhead Cloud
Go to file
Marius Pana 7d85c685fb fixed typo in eval or compose 2018-07-11 16:54:10 +03:00
LICENSE Initial commit 2017-05-19 10:16:47 -07:00 updated readme for sc 2018-02-12 17:19:15 +02:00
spearhead-docker fixed typo in eval or compose 2018-07-11 16:54:10 +03:00

Spearhead Docker CLI helper

This script will install compatible Docker versions for use with the Spearhead Cloud.

Your existing Docker will not be affected and you can conveniently switch between your own Docker and the Spearhead Cloud docker tools.

Compatibility and requirements

This is designed and tested for Linux and MacOS X.

This code requires Spearhead Cloud CLI tool and a Spearhead Cloud account.


In a terminal window, run the following command:

sudo bash -c 'curl -o /usr/local/bin/spearhead-docker && chmod +x /usr/local/bin/spearhead-docker && ln -Fs /usr/local/bin/spearhead-docker /usr/local/bin/spearhead-compose && ln -Fs /usr/local/bin/spearhead-docker /usr/local/bin/spearheadn-docker-install'

That command will copy the spearhead-docker shell script from this repo, and link it as spearhead-compose and spearhead-docker-install.

To complete the installation, run sudo spearhead-docker-install to install the platform-specific versions of the Docker (now Moby) and Docker Compose CLI tools. These versions will not replace any existing Docker or Docker Compose versions you may have installed.


Once installed, use spearhead-docker and spearhead-compose in place of docker and docker-compose when interacting with the Spearhead Cloud.

Start a Docker container running Nginx container on Spearhead Cloud:

$ spearhead-docker run -d -p 80 --name webserver nginx
Executing in 'ro-1' (default; use `spearhead profile set <profile name>` to change) at 05:02:41 AM

Start all the containers to run WordPress via Docker Compose on Spearhead Cloud:

$ spearhead-compose up -d
Executing in 'ro-1' (default; use `spearhead profile set <profile name>` to change) at 03:15:56 PM
Creating wp_wordpress_1
Creating wp_nginx_1
Creating wp_nfs_1
Creating wp_memcached_1
Creating wp_prometheus_1
Creating wp_mysql_1
Creating wp_consul_1

More about:

Triton Container Name Service helpers

This will also set some helpful environment variables for using Triton Container Name Service (CNS):


Those vars will be automatically set with values appropriate for use in Spearhead Public Cloud:


In addition to the shell script in this repo, this script will install: