Public | Automated Build

Last pushed: a year ago
Short Description
An extendable Docker image for Airbnb's Caravel platform.
Full Description


An extendable Docker image for Airbnb's Caravel platform.

Basic Setup

By default the Caravel meta database will be stored in a local sqlite database, in the most basic case getting a working Caravel instance up and running is as simple as:

docker run -d --name caravel -p 8088:8088 tylerfowler/caravel

The entrypoint script will set up an admin user for you using the ADMIN_* environment variables, with a default username and password of:

username: admin
password: caravel

Modifying Admin Credentials

The admin user is created in the entrypoint script using the ADMIN_* environment variables in the Dockerfile, which should be overriden.

docker run -d --name caravel \
  -e ADMIN_USERNAME=myadminuser \
  -e \
  -e ADMIN_PWD=mypassword \
  -p 8088:8088 \

Modifying Database Backends

In order to keep the base image as lean as possible only the Postgres driver is included and any other database drivers or libraries that are needed should be installed in a downstream image. To use a different backend you just need to install the appropriate drivers and modify the $CAR_META_DB_URI to be the database connection string for the backend, which is only used in the entrypoint script at runtime.

Modifying the Caravel Configuration

The Caravel config file is generated dynamically in the entrypoint script using the CAR_* environment variables, for example to increase the row limit to 10000 and the number of webserver threads to 16:

docker run -d --name caravel \
  -e CAR_ROW_LIMIT=10000 \
  -p 8088:8088 \

Advanced Configuration via Custom Entrypoint

In order to correctly set up Caravel the entrypoint needs to be set the script, though if a more advanced configuration is required you can also supply your own entrypoint script.

In your Dockerfile add any script as long as it ends up at / This script will be run after the initial is generated but before any of the Caravel setup commands are ran. Note that the environment variables will still be used to bootstrap the Caravel configuration file.

For example to add a Redis cache to your configuration:


  'CACHE_TYPE': 'RedisCache',
  'CACHE_REDIS_URL': 'localhost:6379'

After this is finished running Caravel will continue to configure itself as normal. Alternately, if the init script detects that a file already exists under $CARAVEL_HOME then it will skip bootstrapping the file altogether and will use the user supplied config instead. Similarly after Caravel is finished setting itself up (migrating the DB, initializing, creating admin user, etc...) it will write an empty file at $CARAVEL_HOME/.setup-complete so that subsequent runs on a mounted volume will not set up Caravel from scratch. To take advantage of this fact simply mount the $CARAVEL_HOME directory (which is /caravel by default).

docker run -d --name caravel \
  -v /mycaravel:/caravel \
  -p 8088:8088 \

Note, however, that even if an existing Caravel configuration is detected, any user supplied file will still be run. So if need be write a file that can be checked for to ensure your script only runs once in the same fashion that the script does.


Docker Pull Command
Source Repository