Docker file to build skype in a docker container
First of all i really suggest avoiding skype if it's possible, since it's propietary software and nobody
knows what it really does. But in case you have no choice and must use it, you could run it in a safe and
isolated docker container. This dockerfile it's just a little modified version of the tomparys/skype one.
Since in some machines (like mine, an asus-k52f) the camera is mounted upside-down, i've added libv4l-0:i386
as a dependency, and i've modified the skype launcher to display image correctly, preloading it through this
library. Note the other applications that uses the webcam, like cheese, guvcview or the google hangouts plugin
doesn't have this problem, and do all automatically. Another reason to say that skype sucks.
Steps to build the image
1.Pull the image from docker hub:
docker pull evilegidiux/skype
2.Run the daemonized container, mapping the container port 22 (default ssh)
to host port 55555. Also specify --privileged option and map video source
/dev/video0 to /dev/video0 on host to get access to the webcam:
docker run --privileged -d -p 55555:22 -v /dev/video0:/dev/video0:rw evilegidiux/skype
3.Install paprefs to configure pulseaudio server. Launch it and check the
"Enable network access to local sound devices" and "Don't require authentication"
checkboxes. After this kill and restart pulseaudio.
pulseaudio -k pulseaudio --start
4.Create or append this to your ~/.ssh/config:
Host docker-skype User docker Port 55555 HostName 127.0.0.1 RemoteForward 64713 localhost:4713 ForwardX11 yes
5.Now you can launch the image this way:
ssh docker-skype skype-pulseaudio
the ssh password is "docker". You could also use an ssh key without password to
avoid the password prompt each time you launch the image. Also, if you're the only
user on the system, i suggest to add yourself to the docker group, to avoid using docker