Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Docker support #1072 #1073

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this env exists. you'd wanna set the keys as env vars when running the container

https://block.github.io/goose/docs/troubleshooting/#keychainkeyring-errors

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run -ti --rm --entrypoint=/bin/bash \
  -e DATABRICKS_HOST="$DATABRICKS_HOST" \
  -e DATABRICKS_TOKEN="$DATABRICKS_TOKEN" \
  goose


CMD ["/app/goose"]