Version 4 (modified by 2 years ago) (diff) | ,
---|
See also: wiki/Usage/Docker.
Pre-req: Install Docker
https://docs.docker.com/engine/installation/
Pull the centos latest image
# docker pull centos:latest
Startup the container and install xpra
hostname# docker run -it -h container -p 192.168.99.100:10010:10010 centos:latest /bin/bash root@container# cd /etc/yum.repo.d root@container# curl -O https://winswitch.org/downloads/CentOS/winswitch.repo root@container# yum repolist root@container# yum install xpra
Install dependency packages
- You may hit bellow error if you run xpra in container now:
/bin/xpra_Xdummy: line 52: which: command not found failed to locate Xorg binary to run 2015-12-23 16:19:11,020 2015-12-23 16:19:11,024 Xvfb command has terminated! xpra cannot continue
this is because xvfb and which is not installed on centos7.2 official image. We need to install itroot@container#yum install xorg-x11-server-Xvfb root@container#yum install which
Generate uuid for container
- You may hit UUID problem:
D-Bus library appears to be incorrectly set up; failed to read machine uuid: UUID file '/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text
which can be resolved by:
root@container#dbus-uuidgen >/etc/machine-id
Run xpra in container
- Create a new user in container:
root@container# useradd -m xpra1 root@container# passwd xpra1
- Start xpra server with the created user (you may need to yum install emacs if you also want to run emacs):
root@container# su - xpra1 xpra1@container$ xpra start :100 --start-child=emacs --bind-tcp=0.0.0.0:10010
- After that you can connect with xpra client!!
Tips
- If you hit fakesystemd error during install xpra
fakesystemd-1-17.el7.centos.noarch has installed conflicts systemd: fakesystemd-1-17.el7.centos.noarch
Please refer to fixing-centos-7-systemd-conflicts-with-docker