Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d8b1369c3 | |||
| 751402be44 | |||
| 66e0d1f406 | |||
| e89c3040b7 | |||
| 8d7b39f1b5 | |||
| 32e87254d2 | |||
| 66ccee1202 | |||
| 1909c2a3aa | |||
| d078bb1c44 | |||
| 8870d60ccc |
+10
-3
@@ -25,13 +25,19 @@ RUN apt-get update && apt-get install -y \
|
|||||||
sudo \
|
sudo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Chrome
|
# Install Chrome and xdg-utils (needed for xdg-open to work in VNC)
|
||||||
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg && \
|
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg && \
|
||||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y google-chrome-stable && \
|
apt-get install -y google-chrome-stable xdg-utils && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Chrome wrapper: adds flags required for running inside a Docker container.
|
||||||
|
# xdg-open (used by Claude Code on Linux) respects $BROWSER, so pointing it
|
||||||
|
# here ensures the OAuth popup works without manual --no-sandbox invocations.
|
||||||
|
RUN printf '#!/bin/bash\nexec /usr/bin/google-chrome-stable \\\n --no-sandbox \\\n --disable-dev-shm-usage \\\n --disable-gpu \\\n "$@"\n' > /usr/local/bin/google-chrome && \
|
||||||
|
chmod +x /usr/local/bin/google-chrome
|
||||||
|
|
||||||
# Install Node.js (LTS version for Happy Coder)
|
# Install Node.js (LTS version for Happy Coder)
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||||
apt-get install -y nodejs && \
|
apt-get install -y nodejs && \
|
||||||
@@ -69,7 +75,8 @@ WORKDIR /workspace
|
|||||||
|
|
||||||
# Configure container to run as user user
|
# Configure container to run as user user
|
||||||
ENV HOME=/home/user \
|
ENV HOME=/home/user \
|
||||||
USER=user
|
USER=user \
|
||||||
|
BROWSER=/usr/local/bin/google-chrome
|
||||||
|
|
||||||
# Expose VNC port (baseimage-gui default)
|
# Expose VNC port (baseimage-gui default)
|
||||||
EXPOSE 5800
|
EXPOSE 5800
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ githubRepo: ""
|
|||||||
# Happy Coder endpoints
|
# Happy Coder endpoints
|
||||||
happyServerUrl: "https://happy.farh.net"
|
happyServerUrl: "https://happy.farh.net"
|
||||||
happyWebappUrl: "https://happy-coder.farh.net"
|
happyWebappUrl: "https://happy-coder.farh.net"
|
||||||
happyHomeDir: "/home/user/.happy"
|
happyHomeDir: "/workspace/.happy"
|
||||||
happyExperimental: "true"
|
happyExperimental: "true"
|
||||||
|
|
||||||
# VNC display
|
# VNC display
|
||||||
|
|||||||
@@ -59,10 +59,16 @@ chown -R "$RUN_UID:$RUN_GID" "$WORKSPACE_DIR"
|
|||||||
mkdir -p "$HOME"
|
mkdir -p "$HOME"
|
||||||
chown "$RUN_UID:$RUN_GID" "$HOME"
|
chown "$RUN_UID:$RUN_GID" "$HOME"
|
||||||
|
|
||||||
# Start Happy Coder daemon
|
# Start Happy Coder daemon. startapp.sh already runs as the app user (UID 1000),
|
||||||
|
# so no sudo needed — Happy/Claude Code will find credentials in the correct home dir.
|
||||||
echo "Starting Happy Coder..."
|
echo "Starting Happy Coder..."
|
||||||
cd "$WORKSPACE_DIR"
|
|
||||||
|
|
||||||
|
# HAPPY_HOME_DIR is in /workspace (emptyDir), so it is always fresh on pod start.
|
||||||
|
# Remove the lock file as a safety net in case daemon start is called more than
|
||||||
|
# once within the same container lifetime.
|
||||||
|
rm -f "${HAPPY_HOME_DIR:-/workspace/.happy}/daemon.state.json.lock"
|
||||||
|
|
||||||
|
cd "$WORKSPACE_DIR"
|
||||||
happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..."
|
happy daemon start || echo "Happy Coder daemon failed to start, continuing anyway..."
|
||||||
|
|
||||||
echo "Happy Coder daemon started"
|
echo "Happy Coder daemon started"
|
||||||
|
|||||||
Reference in New Issue
Block a user