This is a clone of triton-docker-cli for use with the Spearhead Cloud
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 3.2KB

  1. # Spearhead Docker CLI helper
  2. This script will install compatible Docker versions for use with the Spearhead Cloud.
  3. Your existing Docker will not be affected and you can conveniently switch between your own Docker and the Spearhead Cloud docker tools.
  4. ### Compatibility and requirements
  5. This is designed and tested for Linux and MacOS X.
  6. This code requires [Spearhead Cloud CLI tool]( and [a Spearhead Cloud account](
  7. ### Installation
  8. In a terminal window, run the following command:
  9. ```bash
  10. 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'
  11. ```
  12. That command will copy the `spearhead-docker` shell script from this repo, and link it as `spearhead-compose` and `spearhead-docker-install`.
  13. 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.
  14. ### Usage
  15. Once installed, use `spearhead-docker` and `spearhead-compose` in place of `docker` and `docker-compose` when interacting with the Spearhead Cloud.
  16. Start a Docker container running Nginx container on Spearhead Cloud:
  17. ```bash
  18. $ spearhead-docker run -d -p 80 --name webserver nginx
  19. Executing in 'ro-1' (default; use `spearhead profile set <profile name>` to change) at 05:02:41 AM
  20. x5gso83h9365831psn43h7qwuc3115f9fitff59b2151694a963043sue94k2f73
  21. $
  22. ```
  23. Start [all the containers to run WordPress]( via Docker Compose on Spearhead Cloud:
  24. ```bash
  25. $ spearhead-compose up -d
  26. Executing in 'ro-1' (default; use `spearhead profile set <profile name>` to change) at 03:15:56 PM
  27. Creating wp_wordpress_1
  28. Creating wp_nginx_1
  29. Creating wp_nfs_1
  30. Creating wp_memcached_1
  31. Creating wp_prometheus_1
  32. Creating wp_mysql_1
  33. Creating wp_consul_1
  34. $
  35. ```
  36. More about:
  37. - [Docker commands on Triton](
  38. - [Docker Compose on Triton](
  39. - [Optimizing your Docker operations for Triton](
  40. ### Triton Container Name Service helpers
  41. This will also set some helpful environment variables for using [Triton Container Name Service (CNS)](
  44. Those vars will be automatically set with values appropriate for use in Spearhead Public Cloud:
  45. ```
  48. ```
  49. ### Components
  50. In addition to the shell script in this repo, this script will install:
  51. - [Moby 1.12.6](
  52. - [Docker Compose 1.9.0](