../../_images/login_button.png ../../_images/signup_button.png



Custom Docker Image

Pull From the Registry

Note

This only applies to self hosted Scalr.

The Docker image that Scalr executes all runs with is Debian Buster by default. Since this is a base image, you may find it necessary to use a custom private image.

To use a custome image:

  1. Log into the Docker hub, using the Scalr application path:

/opt/scalr-server/embedded/bin/docker login
  1. Pull the Docker image that you want to use:

/opt/scalr-server/embedded/bin/docker -H unix:///opt/scalr-server/run/dkr/docker.sock pull <IMAGE>
  1. Add the <image> to the the scalr-server.rb file on the app server

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

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

Build an Image in Scalr

Note

This only applies to self hosted Scalr.

The Docker image that Scalr executes all runs with is Debian Buster 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 using the docker binary that is embedded with Scalr:

/opt/scalr-server/embedded/bin/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.