Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
dream10201 committed Nov 27, 2024
1 parent df04111 commit b889650
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
FROM debian:latest AS base
ENV LANG=zh_CN.UTF-8 \
LC_ALL=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive \
&& apt install -y wget curl unzip locales locales-all \
&& apt install -y wget curl unzip locales locales-all sudo \
&& locale-gen zh_CN.UTF-8 \
&& update-locale LANG=zh_CN.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& groupadd -g 1000 appgroup \
&& useradd -u 1000 -g appgroup -m appuser \
&& usermod -aG sudo appuser

FROM base AS desktop
RUN apt update \
Expand Down Expand Up @@ -87,6 +91,8 @@ RUN apt update \

FROM oneonefive
EXPOSE 1150
ENV DISPLAY=:115
ENV DISPLAY=:115 \
HOME=/home/appuser
COPY run.sh /run.sh
USER appuser
CMD ["bash","/run.sh"]
7 changes: 3 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
umask 000
sed -i "1s/^/const CID=\"${CID}\"\nconst SEID=\"${SEID}\"\nconst UID=\"${UID}\"\n/" /usr/local/115Cookie/worker.js
sudo sed -i "1s/^/const CID=\"${CID}\"\nconst SEID=\"${SEID}\"\nconst UID=\"${UID}\"\n/" /usr/local/115Cookie/worker.js
if [ -z "${DISPLAY_WIDTH}" ]; then
DISPLAY_WIDTH=1366
fi
Expand All @@ -12,9 +11,9 @@ mkdir -p "${HOME}/.vnc"
export PASSWD_PATH="${HOME}/.vnc/passwd"
echo ${PASSWORD} | vncpasswd -f > "${PASSWD_PATH}"
chmod 0600 "${HOME}/.vnc/passwd"
"${NO_VNC_HOME}"/utils/novnc_proxy --vnc localhost:6015 --listen 1150 &
sudo "${NO_VNC_HOME}"/utils/novnc_proxy --vnc localhost:6015 --listen 1150 &
echo "geometry=${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" > ~/.vnc/config
/usr/libexec/vncserver :115 &
sudo /usr/libexec/vncserver :115 &
sleep 2;
pcmanfm --desktop &
/usr/local/115Browser/115.sh
Expand Down

0 comments on commit b889650

Please sign in to comment.