Running teams inside a container on Linux
1.9K
This project is fully inspired of Marc Douchement's docker-zoom-us, which in turn was inspired by sameersbn Skype's containerization.
Dockerfile to create a Docker container image with Teams for Linux with support for audio/video calls.
The image uses X11 and Pulseaudio unix domain sockets on the host to enable audio/video support in Teams. These components are available out of the box on pretty much any modern linux distribution.
If you find this image useful here's how you can help:
Automated builds of the image are available on Dockerhub and is the recommended method of installation.
docker pull olberger/docker-teams-linux:latest
Alternatively you can build the image yourself.
docker build -t olberger/docker-teams-linux github.com/olberger/docker-teams-linux
With the image locally available, install the wrapper scripts by running the following as root:
docker run -it --rm \
--volume /usr/local/bin:/target \
olberger/docker-teams-linux:latest install
This will install a wrapper script to launch teams.
Launch the teams-wrapper script to enter a shell inside the Docker container
teams-wrapper bash
Then the prompt should be displayed like:
Adding user `teams' to group `sudo' ...
Adding user teams to group sudo
Done.
bash
teams@0b2fefbf45d2:~$
then type teams.
Note
If Teams is installed on the the host then the host binary is launched instead of starting a Docker container. To force the launch of Teams in a container use the
teams-wrapperscript. For example,teams-wrapper teamswill launch Teams inside a Docker container regardless of whether it is installed on the host or not.
The wrapper scripts volume mount the X11 and pulseaudio sockets in the launcher container. The X11 socket allows for the user interface display on the host, while the pulseaudio socket allows for the audio output to be rendered on the host.
When the image is launched the following directories are mounted as volumes
${HOME}/.config/teams${HOME}/.config/MicrosoftThis makes sure that your profile details are stored on the host and files received via Teams are available on your host in the appropriate download directory.
Don't want to expose host's folders to Teams?
Add TEAMS_HOME environment variable to namespace all Teams folders:
export TEAMS_HOME=${HOME}/teams
To upgrade to newer releases:
docker pull olberger/docker-teams-linux:latest
install to make sure the host scripts are updated.docker run -it --rm \
--volume /usr/local/bin:/target \
olberger/docker-teams-linux:latest install
docker run -it --rm \
--volume /usr/local/bin:/target \
olberger/docker-teams-linux:latest uninstall
This should ensure to download again the client (and update any other bits in the image
docker build --no-cache -t olberger/docker-teams-linux github.com/olberger/docker-teams-linux
Content type
Image
Digest
Size
389.8 MB
Last updated
over 5 years ago
docker pull olberger/docker-teams-linux