Add code-server integration with custom configuration
- Remove systemctl commands from Dockerfile (incompatible with containers) - Add code-server auto-start in entrypoint.sh on port 30145 - Set /mnt as default working directory for code-server - Configure proper permissions for /mnt directory 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -63,11 +63,10 @@ RUN apt-get install -y fcitx5 --fix-missing
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
## code server
|
||||
curl -fsSL https://code-server.dev/install.sh | sh
|
||||
sudo systemctl enable --now code-server@$USER
|
||||
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||
|
||||
## PlayWright Chrome
|
||||
npx playwright install chrome
|
||||
RUN npx playwright install chrome
|
||||
|
||||
# git information
|
||||
RUN git config --global user.email "user@mail.com"
|
||||
|
||||
@@ -23,7 +23,11 @@ echo "user '$XWINDOW_USER' password set."
|
||||
|
||||
# change own and permission
|
||||
chown $XWINDOW_USER:$XWINDOW_USER /home/$XWINDOW_USER
|
||||
chmod 700 /home/$XWINDOW_USER
|
||||
chmod 700 /home/$XWINDOW_USER
|
||||
|
||||
# create and set permission for /mnt directory
|
||||
mkdir -p /mnt
|
||||
chown $XWINDOW_USER:$XWINDOW_USER /mnt
|
||||
|
||||
# add sudo group
|
||||
usermod -aG sudo $XWINDOW_USER
|
||||
@@ -48,6 +52,9 @@ if [ "$SANDBOX_CHECK_EXIT_CODE" -ne 0 ]; then
|
||||
fi
|
||||
set -e
|
||||
|
||||
# start code-server in background
|
||||
su - $XWINDOW_USER -c "code-server --bind-addr 0.0.0.0:30145 --auth password /mnt" &
|
||||
|
||||
# run program
|
||||
/usr/sbin/xrdp-sesman
|
||||
/usr/sbin/xrdp --nodaemon
|
||||
|
||||
Reference in New Issue
Block a user