ConSol / docker-headless-vnc-container

Collection of Docker images with headless VNC environments
Apache License 2.0
1.72k stars 735 forks source link

Could you help me check this issue? #15

Closed codlin closed 7 years ago

codlin commented 7 years ago

Hi, I create a container with command 'docker run --name AAA -d -p 5902: 5901 -p 6902: 6901 consol/ubuntu-xfce-vnc', then I put some documents to container, and commit container docker commit AAA AAA:test then I create new container using this new images: docker run --name BBB -d -p 5903: 5901 -p 6903: 6901 AAA:test but I cannot connet this container via VNC view, I found some ps didn't start: root@2d08a0d421eb:/# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 17964 1548 ? Ss 08:35 0:00 /bin/bash /root/scripts/vnc_startup.sh --tail-log root 11 0.0 0.0 18000 1596 ? S 08:35 0:00 bash /root/noVNC/utils/launch.sh --vnc 172.17.0.4:5901 --listen 6901 root 24 0.1 0.0 39984 10360 ? S 08:35 0:00 python /root/noVNC/utils/websockify/run --web /root/noVNC/utils/../ 6901 172.17.0.4:5901 root 36 0.0 0.0 4380 616 ? S 08:35 0:00 tail -f /root/.vnc/556278db7553:1.log root 37 0.6 0.0 18192 1980 ? Ss 08:35 0:00 /bin/bash root 52 0.0 0.0 15560 1124 ? R+ 08:35 0:00 ps aux

the normal(AAA) should be: root@556278db7553:/# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 17964 1552 ? Ss 08:10 0:00 /bin/bash /root/scripts/vnc_startup.sh --tail-log root 12 0.0 0.0 18000 1600 ? S 08:10 0:00 bash /root/noVNC/utils/launch.sh --vnc 172.17.0.3:5901 --listen 6901 root 26 0.0 0.0 40240 10356 ? S 08:10 0:00 python /root/noVNC/utils/websockify/run --web /root/noVNC/utils/../ 6901 172.17.0.3:5901 root 39 0.0 0.0 104440 24628 ? S 08:10 0:00 Xvnc4 :1 -desktop 556278db7553:1 () -auth /root/.Xauthority -geometry 1280x1024 -depth 24 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X1 root 44 0.0 0.0 4440 648 ? S 08:10 0:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc root 49 0.0 0.0 30656 1792 ? S 08:10 0:00 vncconfig -iconic root 74 0.0 0.0 10620 312 ? Ss 08:10 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager root 77 0.0 0.0 24432 596 ? S 08:10 0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager root 78 0.0 0.0 39256 1264 ? Ss 08:10 0:00 //bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session root 88 0.0 0.0 235564 6728 ? Sl 08:10 0:00 xfce4-session root 90 0.0 0.0 39452 2472 ? S 08:10 0:00 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd root 94 0.0 0.0 154516 9904 ? S 08:10 0:00 xfwm4 root 98 0.0 0.0 353840 14492 ? Sl 08:10 0:00 xfce4-panel root 100 0.0 0.0 162312 6184 ? S 08:10 0:00 Thunar --daemon root 102 0.0 0.0 488816 28624 ? Sl 08:10 0:00 xfdesktop root 106 0.0 0.0 326004 9248 ? Ssl 08:10 0:00 xfsettingsd root 112 0.0 0.0 356956 3532 ? Sl 08:10 0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher root 119 0.0 0.0 39124 1736 ? S 08:10 0:00 /bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3 root 122 0.0 0.0 124908 3288 ? Sl 08:10 0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session root 126 0.0 0.0 189620 3028 ? Sl 08:10 0:00 /usr/lib/gvfs/gvfsd root 136 0.0 0.0 204848 3060 ? Sl 08:10 0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor root 146 0.0 0.0 356656 3724 ? Sl 08:10 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.14 /org/gtk/gvfs/exec_spaw/0 root 150 0.0 0.0 142788 6464 ? S 08:10 0:00 /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0 /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsystray.so 6 14680098 systray Notification Area Area where notification root 153 0.0 0.0 152988 8512 ? S 08:10 0:00 /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0 /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libactions.so 2 14680099 actions Action Buttons Log out, lock or other syst root 156 0.0 0.0 4380 616 ? S 08:10 0:00 tail -f /root/.vnc/556278db7553:1.log root 157 0.1 0.0 18192 2000 ? Ss 08:44 0:00 /bin/bash root 172 0.0 0.0 15560 1124 ? R+ 08:45 0:00 ps aux

Could you help me check this issue?

thanks.

toschneck commented 7 years ago

I will take a look it ;-)

codlin commented 7 years ago

@toschneck Hi,

I found the problem, it troubes me one whole day. Into the new container, and delete /tmp/. then exit and restart it, vnvserver can be started normally. I tried to build images earlier, I use 'rm -f /tmp/ to delete files in Dockfile, but no effect, this command didn't delete .* Now I build a new images and vnc is ok. Thanks.

Dockfile:

FROM AAA:test
MAINTAINER Tobias Schneck "tobias.schneck@consol.de"

ENV REFRESHED_AT 2017-03-10

ENV DEBIAN_FRONTEND noninteractive
ENV DISPLAY :1
ENV NO_VNC_HOME /root/noVNC
ENV VNC_COL_DEPTH 24
ENV VNC_RESOLUTION 1280x1024
ENV VNC_PW vncpassword

ENV SAKULI_DOWNLOAD_URL https://labs.consol.de/sakuli/install

RUN rm -rf /tmp/* \
    && rm -rf /tmp/.*x* \
    && rm -rf /var/lib/apt

# xvnc server porst, if $DISPLAY=:1 port will be 5901
EXPOSE 5901
# novnc web port
EXPOSE 6901

ENTRYPOINT ["/root/scripts/vnc_startup.sh"]
CMD ["--tail-log"]

toschneck commented 7 years ago

I'm also see this, I already try to fix it. give me an hour or so :wink:

codlin commented 7 years ago

Thank you very much for your quick response. You're greate!

toschneck commented 7 years ago

@codlin thx for finding! I fixed it in the startup script see, https://github.com/ConSol/docker-headless-vnc-container/commit/fcb0b2def5cab36ec184aab46cab2fd0b4598e28. This fixes and the other new features like usermod are currently all in the dev branch. I will try to release a new version soon. Until this you can use the dev taged image: docker run ... consol/ubuntu-xfce-vnc:dev