Chalk home page
Docs
API
CLI
  1. Development
  2. Docker

Chalk runs your feature pipelines on Docker images. If your code relies only on your resolvers and data source definitions, you may use Chalk’s base image with no modification. If you require additional dependencies, you can specify installation and management instructions.

You can specify build options on a per-environment basis, and you can provide a default set of configuration for environments that do not have explicit configuration values.

Extra pip dependencies

Chalk can install extra dependencies with pip. By default, Chalk looks for a file named requirements.txt in the base of your project.

However, you can override this location or specify requirements files per-environment in the chalk.yaml file located at the base of your repo.

project: my-project-id
environments:
  default:
    runtime: python311
    requirements: ./requirements.txt
    dockerfile: Dockerfile
  prod:
    requirements: ./requirements-prod.txt

Building your own image

You may have dependencies that cannot be expressed through pip. For those dependencies, you need to customize the base image Chalk uses to run your pipelines. Chalk allows you to specify a custom Dockerfile that will be used to build a base image for your deploys.

project: my-project-id
environments:
  default:
    dockerfile: ./Dockerfile
  prod:
    dockerfile: ./DockerfileProd

You build any Debian-based image that you like, with a few requirements:

  • python must be on the path
  • pip must be on the path
  • The Python version can be python310 or python311
  • There should be no folder or file at /app

Chalk is responsible for mounting your code into the image, and for installing your requirements with pip.


Python Version

The Python version for a Chalk project is set at the project level. The version is set with the chalk.yml file in your project repo. Chalk supports both python310 and python311 as values for runtime:

project: my-project-id
environments:
  default:
    runtime: python311
  prod:
    runtime: python310