Skip to content

Commit

Permalink
fix Abnormal exit
Browse files Browse the repository at this point in the history
  • Loading branch information
john-shine committed Oct 19, 2019
1 parent 7298be3 commit 13b6ccf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions BaiduNetdisk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ RUN yum check-update -y ; \
/bin/echo -e "\n${USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
yum clean all && rm -rf /var/cache/yum/*

RUN touch ${HOME}/.vnc/passwd ${HOME}/.Xauthority
RUN touch ${HOME}/.vnc/passwd ${HOME}/.Xauthority /var/log/baidunetdisk.log

RUN chown -R ${UID}:${GID} ${HOME} && \
chmod 775 ${HOME}/.vnc/xstartup && \
chown ${UID}:${GID} /var/log/baidunetdisk.log && \
chmod 755 ${HOME}/.vnc/xstartup && \
chmod 600 ${HOME}/.vnc/passwd

WORKDIR ${HOME}
Expand Down Expand Up @@ -60,6 +61,6 @@ RUN /bin/echo -e 'alias ll="ls -last"' >> ${HOME}/.bashrc
RUN /bin/echo -e "export DISPLAY=${DISPLAY}" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e "[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources\nxsetroot -solid grey" >> ${HOME}/.vnc/xstartup

RUN /bin/echo -e "/opt/baidunetdisk/baidunetdisk >> ~/.baidunetdisk.log 2>&1" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e "tail -f /dev/null" >> ${HOME}/.vnc/xstartup

RUN /bin/echo -e "while true; do" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e " /opt/baidunetdisk/baidunetdisk >> /var/log/baidunetdisk.log 2>&1" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e "done" >> ${HOME}/.vnc/xstartup
2 changes: 1 addition & 1 deletion BaiduNetdisk/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5
1.6
2 changes: 1 addition & 1 deletion BaiduNetdisk/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ if [[ -f ${HOME}/.vnc/passwd ]]; then
echo "${vnc_password}" | vncpasswd -f > ${HOME}/.vnc/passwd
fi

[ -z "${DISPLAY}" ] || /usr/bin/vncserver -kill ${DISPLAY}; sudo rm -f /tmp/.X*-lock; sudo rm -rf /tmp/.X11-unix/; sleep 2
[ -z "${DISPLAY}" ] || /usr/bin/vncserver -kill ${DISPLAY}; sudo rm -f /tmp/.X*-lock; sudo rm -rf /tmp/.X11-unix/*; sleep 2
/usr/bin/vncserver -geometry 1024x800 -fg

0 comments on commit 13b6ccf

Please sign in to comment.