How to use the Great Expectation Docker images

This guide will help you use the official Great Expectations Docker images. This is useful if you wish to have a fully portable Great Expectations runtime that can be used locally or deployed on the cloud.

Prerequisites: This how-to guide assumes you have:

Steps

  1. First, choose which image you’d like to use by browsing the official Great Expectations Docker image registry. Note: We do not use the :latest tag, so you will need to specify an exact tag.

  2. Pull the Docker image down, e.g.:

    docker pull greatexpectations/great_expectations:python-3.7-buster-ge-0.12.0
    
  3. Next, we assume you have a Great Expectations project deployed at /full/path/to/your/project/great_expectations. You need to mount the local great_expectations directory into the container at /usr/app/great_expectations, and from there you can run all non-interactice commands, such as running checkpoints and listing items:

    docker run \
    -v /full/path/to/your/project/great_expectations:/usr/app/great_expectations \
    greatexpectations/great_expectations:python-3.7-buster-ge-0.12.0 \
    datasource list
    

Additional notes

If you need to run interactive great_expectations commands, you can simply add the -it flags for interactive mode.

docker run -it \
-v /full/path/to/your/project/great_expectations:/usr/app/great_expectations \
greatexpectations/great_expectations:python-3.7-buster-ge-0.12.0

Comments