A simple Docker setup for running the Fabric CLI.
Build the image from the repository root:
docker build -t fabric -f scripts/docker/Dockerfile .
Fabric stores its configuration in ~/.config/fabric/.env. Mount this path to keep your settings on the host.
mkdir -p $HOME/.fabric-config
# Run setup to create the .env and download patterns
docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric fabric --setup
Subsequent runs can reuse the same directory:
docker run --rm -it -v $HOME/.fabric-config:/home/appuser/.config/fabric fabric -p your-pattern
If you only want to persist the .env file:
# assuming .env exists in the current directory
docker run --rm -it -v $PWD/.env:/root/.config/fabric/.env fabric -p your-pattern
Expose port 8080 to use Fabric's REST API:
docker run --rm -it -p 8080:8080 -v $HOME/.fabric-config:/root/.config/fabric fabric --serve
The API will be available at http://localhost:8080.
Content type
Image
Digest
sha256:a744c0db3…
Size
54.1 MB
Last updated
8 days ago
docker pull kayvan/fabric