Files
opencode-manager/scripts/docker-entrypoint.sh
T
Copilotandtheepicsaxguy d97735c956 Feat/Run Docker container as non-root user for Kubernetes PSP/PSA compatibility (#1)
* Initial plan

* Add non-root user support to Dockerfile

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Add SECURITY.md documentation

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Add Kubernetes example manifest, verification script, and README updates

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Remove documentation changes (SECURITY.md, k8s-example.yaml, verify script, README updates)

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>
2025-12-02 23:56:19 +01:00

37 lines
922 B
Bash

#!/bin/bash
set -e
export HOME=/home/node
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$HOME/.opencode/bin:$HOME/.local/bin:$PATH"
echo "🔍 Checking Bun installation..."
if ! command -v bun >/dev/null 2>&1; then
echo "❌ Bun not found. Installing..."
curl -fsSL https://bun.sh/install | bash
if ! command -v bun >/dev/null 2>&1; then
echo "❌ Failed to install Bun. Exiting."
exit 1
fi
echo "✅ Bun installed successfully"
else
BUN_VERSION=$(bun --version 2>&1 || echo "unknown")
echo "✅ Bun is installed (version: $BUN_VERSION)"
fi
echo "🔍 Checking OpenCode installation..."
if ! command -v opencode >/dev/null 2>&1; then
echo "⚠️ OpenCode not found in PATH"
else
OPENCODE_VERSION=$(opencode --version 2>&1 || echo "unknown")
echo "✅ OpenCode is installed (version: $OPENCODE_VERSION)"
fi
echo "🚀 Starting OpenCode WebUI Backend..."
exec "$@"