Afraid of AI takeover on your machine?
This repository contains a Docker setup for running Exponent in a containerized environment.
Note: this is not Exponent's official Docker setup.
- Docker
- Docker Compose
-
Clone this repository to your host machine.
-
Make sure you have a valid Exponent configuration file at
~/.config/exponent/config.json
on your host machine. You can obtain it by runningexponent login
in your terminal. -
(Optional) Set your user and group IDs if they differ from the default 1000 such that new files created in the container are owned by your user:
UID=$UID GID=$GID VOLUME_PATH=/path/to/your/directory docker compose up --build
-
Set the
VOLUME_PATH
environment variable to specify the directory you want to mount in the container:VOLUME_PATH=/path/to/your/directory docker compose up --build
For example:
VOLUME_PATH=/home/yourname/projects/git_repository docker compose up --build
The docker compose up
command will:
- Set the volume path to your project directory
- Build the Docker image (using the Dockerfile)
- Start the container
To stop the container:
docker compose down
The Docker Compose setup includes two volume mounts:
- Your working directory (specified by
VOLUME_PATH
) is mounted to/app
in the container - Your Exponent config file is mounted read-only from
~/.config/exponent/config.json
to/home/ubuntu/.config/exponent/config.json
- The container automatically runs
exponent run
with the 'Y' confirmation flag - To modify the command being run, edit the
command
field indocker-compose.yml