Skip to content

Commit a38f07f

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 a38f07f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ 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+
script -q -f "$LOGFILE"
104+
exit
105+
fi
106+
EOF
107+
95108
WORKDIR /home/codeuser/project
96109

97110
EXPOSE 8080

0 commit comments

Comments
 (0)