Skip to content

Commit 34c4a27

Browse files
committed
WIP
1 parent 7499950 commit 34c4a27

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

copilot/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ RUN wget -c "${UV_URL}" -O /tmp.tar.gz \
5858
&& mkdir -p $UV_PYTHON_INSTALL_DIR && chmod 777 $UV_PYTHON_INSTALL_DIR
5959

6060
# Install NPM packages
61-
RUN npm install -g @github/copilot @anthropic-ai/claude-code
61+
# Use a custom npm prefix that's world-writable so claude code can auto-update
62+
# when running as a non-root user. Mount this directory as a volume (e.g.
63+
# `-v claude-npm:/npm-global`) to persist the updated binary across runs.
64+
ENV NPM_CONFIG_PREFIX="/npm-global" \
65+
PATH="/npm-global/bin:$PATH"
66+
RUN mkdir -p $NPM_CONFIG_PREFIX \
67+
&& npm install -g @github/copilot @anthropic-ai/claude-code \
68+
&& chmod -R a+rwX $NPM_CONFIG_PREFIX
6269

6370
# Add xclip wrapper for copilot
6471
ADD xclip /usr/local/bin/xclip
65-
66-
WORKDIR /work
67-
68-
#ENTRYPOINT ["copilot"]

0 commit comments

Comments
 (0)