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:
Log into the Docker hub, using the Scalr application path:
/opt/scalr-server/embedded/bin/docker login
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>
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:
Pick a base image using scalr/terraform. See images here: https://hub.docker.com/r/scalr/terraform/tags
Create the Dockerfile on the Scalr app server:
FROM scalr/terraform:0.12.29
RUN install extra software you need
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> .
Add the image to Scalr. Learn more on adding images by going to the Managing Terraform, OPA and Infracost Versions page.