fix(opencode): add debugging output for installation
- Add set -x for verbose command execution - Add error messages if npm install fails - Check which opencode and list global bin directory - Add npm global bin to PATH in bashrc - Add ca-certificates package for HTTPS Quality gates: code review
This commit is contained in:
@@ -168,10 +168,16 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
command: >
|
||||
sh -c "apt-get update && apt-get install -y git &&
|
||||
npm install -g opencode-ai --unsafe-perm &&
|
||||
sh -c "set -x &&
|
||||
apt-get update && apt-get install -y git ca-certificates &&
|
||||
echo 'Installing opencode...' &&
|
||||
npm install -g opencode-ai 2>&1 || echo 'ERROR: npm install failed' &&
|
||||
which opencode || echo 'ERROR: opencode not in PATH' &&
|
||||
npm bin -g &&
|
||||
ls -la $(npm bin -g) || echo 'ERROR: global bin dir not found' &&
|
||||
echo 'export PATH=\"$(npm bin -g):\$PATH\"' >> /root/.bashrc &&
|
||||
echo 'cd /workspace' >> /root/.bashrc &&
|
||||
echo 'OpenCode installed. Run: opencode' &&
|
||||
echo 'OpenCode installation complete' &&
|
||||
cd /workspace &&
|
||||
exec tail -f /dev/null"
|
||||
stdin_open: true
|
||||
|
||||
Reference in New Issue
Block a user