Apply for invite to IaCP

Custom Docker ImageΒΆ

Note

This only applies to self hosted Scalr.

The Docker image that Scalr executes all runs with is Debian v0.13.0-rc1 by default. Since this is a base image, you may find it necessary to install extra binaries for your runs.

To customize your image:

  1. Pick a base image using scalr/terraform. See images here: https://hub.docker.com/r/scalr/terraform/tags

  2. Create the Dockerfile on the Scalr app server:

FROM scalr/terraform:0.12.29

RUN install extra software you need
  1. Build the image on the Scalr app server:

docker build -f <some_name>-runner.dockerfile -t terraform:0.12.29-<some_name> .
  1. Update the scalr-server.rb file on the app server

# vi /etc/scalr-server/scalr-server.rb

app[:configuration] = {
  :scalr => {
    "tf_worker" => {
       "default_terraform_version" => "0.12.29-<some_name>",
       "terraform_images" => {
         "0.12.29-<some_name>" => "terraform:0.12.29-<some_name>"
       }
    }
  }
}
  1. Run scalr-server-ctl reconfigure on the app server.