Last active
March 17, 2025 15:57
-
-
Save laiso/09f8738598ed67644d820dca99423bdb to your computer and use it in GitHub Desktop.
docker build -t goose-coder . && docker run -it goose-coder goose run --with-builtin developer -t 'something'
This file contains hidden or 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
FROM my-app:latest AS my-app | |
FROM ubuntu:22.04 AS goose | |
WORKDIR /root/workspace | |
COPY --from=my-app:latest /app /root/workspace | |
ENV GOOSE_VERSION=v1.0.14 | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install runtime libraries with DBus and keyring support | |
RUN apt-get update && apt-get install -y \ | |
# Runtime dependencies | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
# DBus and keyring | |
dbus \ | |
dbus-x11 \ | |
gnome-keyring \ | |
libsecret-1-0 \ | |
libsecret-tools \ | |
# Other dependencies | |
libssl3 \ | |
libxcb1 \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Node.js | |
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ | |
apt-get update && apt-get install -y nodejs && \ | |
rm -rf /var/lib/apt/lists/* | |
# Install common development tools | |
RUN apt-get update && apt-get install -y \ | |
# Version control | |
git \ | |
# Text processing and search | |
ripgrep \ | |
fd-find \ | |
fzf \ | |
# File manipulation | |
jq \ | |
# Network tools | |
wget \ | |
# Process management | |
htop \ | |
# System utilities | |
sudo \ | |
# Text editors | |
nano \ | |
vim \ | |
# Archive tools | |
zip \ | |
unzip \ | |
# Build essentials | |
build-essential \ | |
# Python | |
python3 \ | |
python3-pip \ | |
# Additional tools | |
tree \ | |
tmux \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install uv using curl | |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh | |
RUN wget https://github.com/block/goose/releases/download/${GOOSE_VERSION}/goose-x86_64-unknown-linux-gnu.tar.bz2 | |
RUN tar -xvf goose-x86_64-unknown-linux-gnu.tar.bz2 | |
RUN chmod +x goose | |
RUN mv goose /usr/local/bin/goose | |
# Create a wrapper script to initialize DBus and keyring | |
RUN echo '#!/bin/bash\n\ | |
# Start DBus session daemon if not running\n\ | |
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then\n\ | |
eval $(dbus-launch --sh-syntax)\n\ | |
export DBUS_SESSION_BUS_ADDRESS\n\ | |
fi\n\ | |
\n\ | |
# Initialize keyring if needed\n\ | |
if [ -z "$GNOME_KEYRING_CONTROL" ]; then\n\ | |
eval $(gnome-keyring-daemon --start)\n\ | |
export GNOME_KEYRING_CONTROL SSH_AUTH_SOCK\n\ | |
fi\n\ | |
\n\ | |
' > /usr/local/bin/entrypoint.sh && \ | |
chmod +x /usr/local/bin/entrypoint.sh | |
# Set up some basic git config | |
RUN git config --global init.defaultBranch main && \ | |
git config --global user.name "Goose Coder" | |
# Add some helpful aliases | |
RUN echo 'alias ll="ls -la"' >> ~/.bashrc && \ | |
echo 'alias fd=fdfind' >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment