Skip to content

Commit af141cd

Browse files
committed
feat: add comprehensive terminal logging to .bashrc
Configure automatic logging of all terminal sessions (interactive and non-interactive) in code-server. Logs are stored in ~/terminal_logs/ with timestamps and process IDs for complete audit trail of all shell activity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
1 parent ee1108d commit af141cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ RUN chmod 755 /home/codeuser/custom-strings.json
9292
USER codeuser
9393
RUN mkdir -p /home/codeuser/Documents/Cline/Rules
9494
COPY --chown=codeuser:codeuser clinerules.md /home/codeuser/Documents/Cline/Rules/clinerules.md
95+
96+
# Add terminal logging to .bashrc
97+
RUN cat >> /home/codeuser/.bashrc << 'EOF'
98+
if [ -z "$SCRIPT_LOG_INIT" ]; then
99+
export SCRIPT_LOG_INIT=1
100+
LOG_DIR="$HOME/terminal_logs"
101+
mkdir -p "$LOG_DIR"
102+
LOGFILE="$LOG_DIR/$(date +%Y%m%d_%H%M%S)_$$.log"
103+
exec script -q -f -c "$SHELL" "$LOGFILE" 2>/dev/null
104+
fi
105+
EOF
106+
95107
WORKDIR /home/codeuser/project
96108

97109
EXPOSE 8080

0 commit comments

Comments
 (0)