mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-07 10:14:21 +01:00
Merge 'Add cli Dockerfile' from Pere Diaz Bou
Shamelessly vibe coded shit to add simple docker image to run the cli :). `docker build -f Dockerfile.cli -t turso-cli . && docker run -it turso- cli` Reviewed-by: Preston Thorpe (@PThorpe92) Closes #2325
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
*target
|
||||
20
Dockerfile.cli
Normal file
20
Dockerfile.cli
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM rust:1.88.0 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the actual source code
|
||||
COPY . .
|
||||
|
||||
# Build the CLI binary
|
||||
RUN cargo build --release --package turso_cli
|
||||
|
||||
# Runtime stage
|
||||
FROM rust:1.88.0-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the built binary
|
||||
COPY --from=builder /app/target/release/tursodb /usr/local/bin/
|
||||
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["tursodb"]
|
||||
6
Makefile
6
Makefile
@@ -150,3 +150,9 @@ bench-exclude-tpc-h:
|
||||
cargo bench $$benchmarks; \
|
||||
fi
|
||||
.PHONY: bench-exclude-tpc-h
|
||||
|
||||
docker-cli-build:
|
||||
docker build -f Dockerfile.cli -t turso-cli .
|
||||
|
||||
docker-cli-run:
|
||||
docker run -it -v ./:/app turso-cli
|
||||
|
||||
@@ -88,6 +88,13 @@ You can also build and run the latest development version with:
|
||||
cargo run
|
||||
```
|
||||
|
||||
If you like docker, we got you covered. Simply run this in the root folder:
|
||||
|
||||
```bash
|
||||
make docker-cli-build && \
|
||||
make docker-cli-run
|
||||
```
|
||||
|
||||
### MCP Server Mode
|
||||
|
||||
The Turso CLI includes a built-in [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that allows AI assistants to interact with your databases. Start the MCP server with:
|
||||
|
||||
Reference in New Issue
Block a user