(Update 26/11/13) Docker 0.6.5 has a breaking change with ports and exposed. It does not provide a port number when you run sudo docker port $CONTAINER_ID 22 anymore. You can assign the port you expose when you do the docker run command as shown below.
To get ubuntu 12.04 to connect to the xpra on the docker-desktop you need to do a few things to get a newer version of Xpra to install.
Ubuntu does not give you an updated version on its packages it knows about so you have to include a new apt-get repo to find it.
Docker-desktop uses ubuntu 12.10 which has xpra version 0.3.11. This is acting as the server.
On your ubuntu 12.04(client) has xpra version 0.0.7.36 will never connect properly to xpra(sever) 0.3.11 it will seem to connect but never log any information about what is going wrong and what is not working.
The 12.04(client) needs to update to xpra to version 0.9.8-1. I have not gotten versions above 0.9.8-1 to work with xpra 0.3.11(server), tt has problems with rendering the screen.
Get version 0.9.8-1 of xpra installed on ubuntu 12.04
# do the following as root as the adding pgp does not work via sudo
sudo su –
# add the pgp key for the source repo
curl http://winswitch.org/gpg.asc | apt-key add –
#add the source to
echo “deb http://winswitch.org/ precise main” > /etc/apt/sources.list.d/winswitch.list
#remove any old version of xpra with vengeance
apt-get purge xpra; apt-get autoremove; apt-get -f install;
#get the latest apt package list
#install a version of xpra 0.9.8-1 that will be able to see the xpra from the docker-desktop install.
apt-get install xpra=0.9.8-1
# Hold onto the version of 0.9.8-1 on the client until you upgrade the server.
apt-mark hold xpra
#Exit as root
# Install, you will see another warning that the package cannot be authenticated. Confirm install. Do not forget your git and docker on the Ubuntu vagrant node.
sudo apt-get install git lxc-docker
#on vagrant node on mac
docker build -t vagrant/docker-desktop git://github.com/rogaha/docker-desktop.git
#attach to container
#new to 0.6.5 is the assigning a port to the exposed port in the docker file
CONTAINER_ID=$(sudo docker run -p 44:22 -d vagrant/docker-desktop)
#get password for container. I like to stick it in a file as I end up forgetting it too frequently.
echo $(sudo docker logs $CONTAINER_ID | sed -n 1p)
#get ipaddress for box It will be similar to 172.17.0.2
ifconfig | grep “inet addr:”
# start up the docker-desktop with a slightly larger screen so Xpra on the mac does attach.
ssh firstname.lastname@example.org ./docker-desktop -s 1000×800 -d 10
Setup the docker-desktop instance to display firefox
#From the mac command line SSH onto the box and set the display to be firefox
# setup display to show firefox
DISPLAY=:10 firefox &
Attach to the docker-desktop from terminal.
# port is now 44 as we assigned it in the run command for the docker container.
xpra –ssh=”ssh -p 44″ attach ssh:email@example.com:10
Thanks again to Roberto G. Hashioka for creating this.