Skip to content

Commit

Permalink
feat: add Docker support
Browse files Browse the repository at this point in the history
This commit adds Docker support to goose via a multi-stage Dockerfile that:
- Uses rust:1.75 for building
- Uses debian:bookworm-slim for runtime
- Includes required system dependencies
- Provides documentation for Docker usage

The Docker image allows running goose without installing Rust locally and
provides a consistent runtime environment.
  • Loading branch information
Ben Levy authored and Ben Levy committed Feb 6, 2025
1 parent 180dff9 commit c919a19
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Build stage
FROM rust:1.84 AS builder

WORKDIR /usr/src/goose

# Copy only the files needed for building
COPY Cargo.toml ./
COPY crates ./crates

# Install minimal build dependenciesd
RUN apt-get update && \
apt-get install -y pkg-config libssl-dev libdbus-1-dev && \
rm -rf /var/lib/apt/lists/*

# Build the binary
RUN cargo build --release

# Runtime stage
FROM debian:bookworm-slim

WORKDIR /app

# Install minimal runtime dependencies
RUN apt-get update && \
apt-get install -y libssl3 ca-certificates libxcb1 libdbus-1-3 && \
rm -rf /var/lib/apt/lists/*

# Copy the binary from builder
COPY --from=builder /usr/src/goose/target/release/goose /app/goose

ENV GOOSE_KEYRING_BACKEND=file

CMD ["/app/goose"]

0 comments on commit c919a19

Please sign in to comment.