ubuntuのセットアップ
- コンテナを取ってきて実行
$ docker pull ubuntu:latest $ docker run -i -t -p 5901:5901 ubuntu:latest
- デスクトップの環境のインストール
# apt-get update # apt-get dist-upgrade # apt-get install vnc4server # apt-get install lubuntu-desktop # apt-get install lxde # apt-get install ibus-anthy
- Xの設定と起動
# useradd -m ubuntu # passwd ubuntu # su - ubuntu $ vncserver $ vncserver -kill :1 $ vi ~/.vnc/xstartup --- #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc /usr/bin/ibus-daemon -d /usr/bin/startlxde & [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & --- $ vncserver :1
HTML5なVNCクライアント
- とりあえずお手軽に試す
セットになっているubuntuは日本語化がめんどうなので使わない
コンテナを取ってきて実行
$ docker pull dorowu/ubuntu-desktop-lxde-vnc $ docker run -i -t -p 6080:6080 dorowu/ubuntu-desktop-lxde-vnc
- 接続先の変更
# vi /noVNC/utils/launch.sh --- VNC_DEST="localhost:5900" ↓ VNC_DEST="***.***.***.***:5901" ---
- リスタート
$ docker restart ************