diff --git a/box-image/Dockerfile b/box-image/Dockerfile index 59f33082..fb933b09 100644 --- a/box-image/Dockerfile +++ b/box-image/Dockerfile @@ -125,7 +125,9 @@ RUN arch="$(dpkg --print-architecture)" \ # The Microsoft Dev Tunnels CLI, which the share-app skill hosts a tunnel # with. It is one self-contained binary with no package, so the version and # the checksum of each build are pinned here. The version check runs it as -# root, and the step removes the files it unpacks into root's home. +# root, and the step removes the files it unpacks into root's home. Root has +# no ~/.local/share, thus the CLI puts its data folder into the working +# directory, and the step removes it there. # # The CLI is a .NET program, and .NET aborts at start without ICU. ARG DEVTUNNEL_VERSION=1.0.2094+24665e6583 @@ -143,7 +145,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends libicu78 \ && echo "$sha /usr/local/bin/devtunnel" | sha256sum -c - \ && chmod 0755 /usr/local/bin/devtunnel \ && devtunnel --version | grep -qF "${DEVTUNNEL_VERSION}" \ - && rm -rf /root/.net /root/.local/share/DevTunnels + && rm -rf /root/.net /DevTunnels # The agent and the adapter, each pinned to a major line. Below 1.0, the caret # pins the minor instead. Do not switch to @zed-industries/claude-code-acp, diff --git a/box-image/setup.sh b/box-image/setup.sh index 46a9856b..8f941052 100644 --- a/box-image/setup.sh +++ b/box-image/setup.sh @@ -69,10 +69,15 @@ fi # --- directories an agent needs to find already there ------------------------ # npm install -g needs its prefix to exist, and Codex fails on a missing -# CODEX_HOME. The seed holds neither directory. +# CODEX_HOME. .NET programs such as devtunnel put their data into the working +# directory when ~/.local/share is missing. The seed holds none of these +# directories. if ! mkdir -p /home/agent/.local/bin; then fail "could not create /home/agent/.local/bin; installing tools would fail" fi +if ! mkdir -p /home/agent/.local/share; then + fail "could not create /home/agent/.local/share; devtunnel would write into the working directory" +fi if ! mkdir -p "${CODEX_HOME:-/home/agent/.codex}"; then fail "could not create ${CODEX_HOME:-/home/agent/.codex}; Codex would not start" fi