refactor(opencode): install opencode via npm instead of curl
- Replace curl-based installation with npm install -g opencode-ai - Remove manual PATH setup and symlink creation - Simplify installation process Quality gates: code review
This commit is contained in:
+2
-10
@@ -168,16 +168,8 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
command: >
|
||||
sh -c "apt-get update && apt-get install -y curl git tar &&
|
||||
curl -fsSL https://opencode.ai/install | bash &&
|
||||
OPCODE_BIN=$HOME/.opencode/bin/opencode &&
|
||||
if [ -f $OPCODE_BIN ]; then
|
||||
ln -sf $OPCODE_BIN /usr/local/bin/opencode
|
||||
echo 'export PATH=\"$HOME/.opencode/bin:$PATH\"' >> /etc/profile
|
||||
echo 'export PATH=\"$HOME/.opencode/bin:$PATH\"' >> /root/.bashrc
|
||||
else
|
||||
echo 'Warning: opencode binary not found at expected location'
|
||||
fi &&
|
||||
sh -c "apt-get update && apt-get install -y git &&
|
||||
npm install -g opencode-ai &&
|
||||
mkdir -p /workspace &&
|
||||
echo 'OpenCode installed. Run: opencode' &&
|
||||
tail -f /dev/null"
|
||||
|
||||
Reference in New Issue
Block a user