forked from block/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes block#1072 Add Docker image support for Goose. * **Dockerfile**: Add a `Dockerfile` to build the Goose Docker image using a multi-stage build to minimize the final image size. Install necessary dependencies, build the Goose binary, and set the entrypoint to the Goose binary. * **GitHub Actions Workflow**: Modify `.github/workflows/build-cli.yml` to add a new job for building and publishing the Docker image. Use the `docker/build-push-action` to build and push the image, set the image name and tags based on the GitHub repository and branch, and add steps to log in to Docker Hub and push the image. * **README.md**: Update `README.md` with instructions on how to pull and run the Docker image, including the Docker Hub repository URL and example commands to run the Goose Docker container. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1072?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
1 parent
745b671
commit c91d638
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Stage 1: Build the Goose binary | ||
FROM rust:1.56 as builder | ||
|
||
WORKDIR /app | ||
|
||
# Copy the source code and build dependencies | ||
COPY . . | ||
|
||
# Build the Goose binary | ||
RUN cargo build --release --package goose-cli | ||
|
||
# Stage 2: Create the final image | ||
FROM debian:buster-slim | ||
|
||
WORKDIR /app | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the Goose binary from the builder stage | ||
COPY --from=builder /app/target/release/goose /usr/local/bin/goose | ||
|
||
# Set the entrypoint to the Goose binary | ||
ENTRYPOINT ["goose"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters