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 custom 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 Scalr. Learn more on adding images by going to the Managing Terraform, OPA and Infracost Versions page.

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. Add the image to Scalr. Learn more on adding images by going to the Managing Terraform, OPA and Infracost Versions page.