From 1ff13a8f4a9b2a9481cacf25ba4c61b7f9bcd1c3 Mon Sep 17 00:00:00 2001 From: Jaroslaw Konik Date: Thu, 14 May 2026 18:05:00 +0200 Subject: [PATCH] update --- agent | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/agent b/agent index facf903..048b4fb 100755 --- a/agent +++ b/agent @@ -36,8 +36,8 @@ case "$app" in npm_pkg="@anthropic-ai/claude-code" cmd="claude" extra_volumes=( - -v "$HOME/.claude:/root/.claude" - -v "$HOME/.claude.json:/root/.claude.json" + -v "$HOME/.claude:$HOME/.claude" + -v "$HOME/.claude.json:$HOME/.claude.json" ) ;; opencode) @@ -45,10 +45,10 @@ case "$app" in npm_pkg="opencode-ai" cmd="opencode" extra_volumes=( - -v "$HOME/.config/opencode:/root/.config/opencode" - -v "$HOME/.local/share/opencode:/root/.local/share/opencode" - -v "$HOME/.local/state/opencode:/root/.local/state/opencode" - -v "$HOME/.claude:/root/.claude" # allow access to claude config for hacked auth + -v "$HOME/.config/opencode:$HOME/.config/opencode" + -v "$HOME/.local/share/opencode:$HOME/.local/share/opencode" + -v "$HOME/.local/state/opencode:$HOME/.local/state/opencode" + -v "$HOME/.claude:$HOME/.claude" # allow access to claude config for hacked auth ) ;; *) @@ -65,15 +65,16 @@ case "$env" in ;; rust) env_suffix="-rust" - env_layer='RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}"' + env_layer='ENV RUSTUP_HOME=/opt/rust/rustup CARGO_HOME=/opt/rust/cargo PATH=/opt/rust/cargo/bin:${PATH} +RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && chmod -R a+rwX /opt/rust' ;; rust-esp32) env_suffix="-rust-esp32" - env_layer='RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" -RUN cargo install espup && espup install -RUN printf '"'"'#!/bin/bash\n. /root/export-esp.sh\nexec "$@"\n'"'"' > /entrypoint.sh && chmod +x /entrypoint.sh + env_layer='ENV RUSTUP_HOME=/opt/rust/rustup CARGO_HOME=/opt/rust/cargo PATH=/opt/rust/cargo/bin:${PATH} +RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path +RUN cargo install espup && espup install --export-file /opt/rust/export-esp.sh +RUN chmod -R a+rwX /opt/rust +RUN printf '"'"'#!/bin/bash\n. /opt/rust/export-esp.sh\nexec "$@"\n'"'"' > /entrypoint.sh && chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]' ;; *) @@ -98,6 +99,8 @@ clear docker run -it --rm \ --name "${image_name}-container" \ + --user "$(id -u):$(id -g)" \ + -e HOME="$HOME" \ -v "$workspace:/workspace" \ "${extra_volumes[@]}" \ -w /workspace \