From 1122dd481600a2e636452faef5b33eb21fd67761 Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Sun, 15 Mar 2026 16:09:59 +0000 Subject: [PATCH] [mod] add user --- docker-images/Dockerfile.agent | 19 ++++++++++--------- docker-images/README.md | 9 +++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docker-images/Dockerfile.agent b/docker-images/Dockerfile.agent index cfaad92..55a6780 100644 --- a/docker-images/Dockerfile.agent +++ b/docker-images/Dockerfile.agent @@ -27,19 +27,19 @@ RUN curl -fsSL https://bun.sh/install | bash # --- NEW SECTION: RUST SETUP --- # 5. Install Rust (Official Script) # Installs Cargo, Rustc, Rustfmt, etc. -ENV RUSTUP_HOME=/root/.rustup -ENV CARGO_HOME=/root/.cargo -ENV PATH="$CARGO_HOME/bin:$PATH" -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile default +#ENV RUSTUP_HOME=/root/.rustup +#ENV CARGO_HOME=/root/.cargo +#ENV PATH="$CARGO_HOME/bin:$PATH" +#RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile default # --- NEW SECTION: GO SETUP --- # 6. Install Go (Latest Stable) # We target 'linux-arm64' because you are on Apple Silicon (M3). -ARG GO_VER=1.23.4 -RUN curl -OL https://golang.org/dl/go${GO_VER}.linux-arm64.tar.gz && \ - tar -C /usr/local -xzf go${GO_VER}.linux-arm64.tar.gz && \ - rm go${GO_VER}.linux-arm64.tar.gz -ENV PATH="/usr/local/go/bin:$PATH" +#ARG GO_VER=1.23.4 +#RUN curl -OL https://golang.org/dl/go${GO_VER}.linux-arm64.tar.gz && \ +# tar -C /usr/local -xzf go${GO_VER}.linux-arm64.tar.gz && \ +# rm go${GO_VER}.linux-arm64.tar.gz +#ENV PATH="/usr/local/go/bin:$PATH" # 6a basex https://files.basex.org/releases/12.2/BaseX122.zip ARG BASEX_VER=12.2/BaseX122.zip @@ -102,6 +102,7 @@ RUN cat < /root/.config/opencode/oh-my-opencode.json } EOF +USER 1000 WORKDIR /workspace ENV SHELL=/bin/zsh CMD ["/bin/zsh"] diff --git a/docker-images/README.md b/docker-images/README.md index 3dae9ee..0a49f5e 100644 --- a/docker-images/README.md +++ b/docker-images/README.md @@ -1,5 +1,14 @@ +# About +Builds a docker image called `smart-agent` +This provides a [Opencode](https://opencode.ai/docs/) install with custom configuration +This image has development tools including python:3.12, java jdk,BaseX +A zsh function (zsh.add) is used to invoke the image. + +# Build ``` docker build -t smart-agent -f Dockerfile.agent . ``` +## Acknowledgements +Inspired by https://www.invisiblefriends.net/running-opencode-with-local-llms-on-an-m3-ultra-512gb/