Many developers and engineers now use docker to simplify development and deployment, and we’re now pleased to announce we have dockerised two of our command line tools: Brightbox Cloud CLI and Terraform.
Now you can start using Brightbox Cloud even faster than before. If you
have docker installed, you now have immediate access to these Brightbox
Cloud tools with no installation required. Just
replace your usual command line with the equivalent
docker run command.
Brightbox Cloud CLI requires a working directory which can store the config. You can map any directory you like, or you can co-opt the default one created by a local cli command. You can use this directory with the following:
docker run -it -v ~/.brightbox:/root/.brightbox brightbox/cli <command>
For example to show the accounts run:
docker run -it -v ~/.brightbox:/root/.brightbox brightbox/cli accounts
and to create a server run:
docker run -it -v ~/.brightbox:/root/.brightbox brightbox/cli server create img-6xysw
The Terraform container includes the terraform tool and the Brightbox provider plugin, so you’re ready to build on Brightbox Cloud straight away. Run the docker container from the directory containing your terraform configuration - as you would do with a locally installed tool.
You can use such a configuration with the following:
docker run -i -t -v $(pwd):/app/ -w /app/ brightbox/terraform <command>
For example: Initialize the plugins (You will only need to do this once)
docker run -i -t -v $(pwd):/app/ -w /app/ brightbox/terraform init
Show the build plan
docker run -i -t -v $(pwd):/app/ -w /app/ brightbox/terraform plan
We hope you find these containers useful, and if there are any other Brightbox Cloud tools you think would benefit from dockerisation, please raise an issue on Github or, even better, send us a pull request.
You can sign up for Brightbox Cloud in just a couple of minutes and get a £20 free credit