Skip to content

Commit d60c617

Browse files
committed
Initial test version
1 parent 5544341 commit d60c617

File tree

4 files changed

+119
-105
lines changed

4 files changed

+119
-105
lines changed

Dockerfile

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# References:
2+
# https://gist.github.com/demaniak/c56531c8d673a6f58ee54b5621796548
3+
# https://github.com/mdouchement/docker-zoom-us
24
# https://hub.docker.com/r/solarce/zoom-us
35
# https://github.com/sameersbn/docker-skype
46
FROM debian:buster
5-
MAINTAINER mdouchement
7+
MAINTAINER olberger
68

79
ENV DEBIAN_FRONTEND noninteractive
810

@@ -20,16 +22,22 @@ RUN apt-get install -qy curl iceweasel sudo desktop-file-utils lib32z1 \
2022
libxcb-keysyms1 libxcb-xtest0 ibus ibus-gtk \
2123
libnss3 libxss1 xcompmgr pulseaudio
2224

23-
ARG ZOOM_URL=https://zoom.us/client/latest/zoom_amd64.deb
25+
RUN apt-get install -qy apt-utils \
26+
libasound2 libatk-bridge2.0-0 libcairo2 libcups2 libgdk-pixbuf2.0-0 \
27+
libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 \
28+
libsecret-1-0 libx11-xcb1 libxcomposite1 libxcomposite1 \
29+
libxss1 apt-transport-https libxkbfile1
30+
31+
ARG TEAMS_URL="https://go.microsoft.com/fwlink/p/?LinkID=2112886&clcid=0x40c&culture=fr-fr&country=FR"
2432

2533
# Grab the client .deb
2634
# Install the client .deb
2735
# Cleanup
28-
RUN curl -sSL $ZOOM_URL -o /tmp/zoom_setup.deb
29-
RUN dpkg -i /tmp/zoom_setup.deb
36+
RUN curl -sSL $TEAMS_URL -o /tmp/teams.deb
37+
RUN dpkg -i /tmp/teams.deb
3038
RUN apt-get -f install
3139

32-
COPY scripts/ /var/cache/zoom-us/
40+
COPY scripts/ /var/cache/teams/
3341
COPY entrypoint.sh /sbin/entrypoint.sh
3442
RUN chmod 755 /sbin/entrypoint.sh
3543

README.md

+36-45
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,89 @@
1-
This project is fully inspired of [sameersbn](https://github.com/sameersbn) [Skype](https://github.com/sameersbn/docker-skype)'s containerization.
1+
This project is fully inspired of Marc Douchement's [docker-zoom-us](https://github.com/mdouchement/docker-zoom-us), which in turn was inspired by [sameersbn](https://github.com/sameersbn) [Skype](https://github.com/sameersbn/docker-skype)'s containerization.
22

3-
# mdouchement/zoom-us
3+
# olberger/teams
44

55
# Introduction
66

7-
`Dockerfile` to create a [Docker](https://www.docker.com/) container image with [Zoom](http://www.zoom.us) for Linux with support for audio/video calls.
7+
`Dockerfile` to create a [Docker](https://www.docker.com/) container image with [Teams](https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/download-app) for Linux with support for audio/video calls.
88

9-
The image uses [X11](http://www.x.org) and [Pulseaudio](http://www.freedesktop.org/wiki/Software/PulseAudio/) unix domain sockets on the host to enable audio/video support in Zoom. These components are available out of the box on pretty much any modern linux distribution.
9+
The image uses [X11](http://www.x.org) and [Pulseaudio](http://www.freedesktop.org/wiki/Software/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.
1010

1111
## Contributing
1212

1313
If you find this image useful here's how you can help:
1414

1515
- Send a pull request with your awesome features and bug fixes
16-
- Help users resolve their [issues](https://github.com/mdouchement/docker-zoom-us/issues?q=is%3Aopen+is%3Aissue).
16+
- Help users resolve their [issues](https://github.com/olberger/docker-teams/issues?q=is%3Aopen+is%3Aissue).
1717

1818
# Getting started
1919

2020
## Installation
2121

22-
Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/mdouchement/zoom-us) and is the recommended method of installation.
22+
Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/olberger/teams) and is the recommended method of installation.
2323

2424
```bash
25-
docker pull mdouchement/zoom-us:latest
25+
docker pull olberger/teams:latest
2626
```
2727

2828
Alternatively you can build the image yourself.
2929

3030
```bash
31-
docker build -t mdouchement/zoom-us github.com/mdouchement/docker-zoom-us
31+
docker build -t olberger/teams github.com/olberger/docker-teams
3232
```
3333

3434
With the image locally available, install the wrapper scripts by running the following as root:
3535

3636
```bash
3737
docker run -it --rm \
3838
--volume /usr/local/bin:/target \
39-
mdouchement/zoom-us:latest install
39+
olberger/teams:latest install
4040
```
4141

42-
This will install a wrapper script to launch `zoom`.
42+
This will install a wrapper script to launch `teams`.
4343

44-
> **Note**
45-
>
46-
> If Zoom is installed on the the host then the host binary is launched instead of starting a Docker container. To force the launch of Zoom in a container use the `zoom-us-wrapper` script. For example, `zoom-us-wrapper zoom` will launch Zoom inside a Docker container regardless of whether it is installed on the host or not.
44+
## Starting Teams
4745

48-
## Web Browser / SSO
46+
Launch the teams-wrapper script to enter a shell inside the Docker container
47+
48+
```bash
49+
teams-wrapper bash
50+
```
4951

50-
Add the following option in `~/.config/zoomus.conf`
52+
Then the prompt should be displayed like:
5153
```
52-
embeddedBrowserForSSOLogin=false
54+
Adding user `teams' to group `sudo' ...
55+
Adding user teams to group sudo
56+
Done.
57+
bash
58+
teams@0b2fefbf45d2:~$
5359
```
5460

55-
Zoom will spawn Iceweasel (Firefox) included in this image and open SSO provider web page.
61+
then type `teams`.
62+
63+
64+
> **Note**
65+
>
66+
> 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-wrapper` script. For example, `teams-wrapper teams` will launch Teams inside a Docker container regardless of whether it is installed on the host or not.
67+
5668

5769
## How it works
5870

5971
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.
6072

6173
When the image is launched the following directories are mounted as volumes
6274

63-
- `${HOME}/.zoom`
6475
- `${HOME}/.config`
6576
- `XDG_DOWNLOAD_DIR` or if it is missing `${HOME}/Downloads`
6677
- `XDG_DOCUMENTS_DIR` or if it is missing `${HOME}/Documents`
6778

68-
This makes sure that your profile details are stored on the host and files received via Zoom are available on your host in the appropriate download directory.
79+
This 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.
6980

70-
**Don't want to expose host's folders to Zoom?**
81+
**Don't want to expose host's folders to Teams?**
7182

72-
Add `ZOOM_HOME` environment variable to namespace all Zoom folders:
83+
Add `TEAMS_HOME` environment variable to namespace all Teams folders:
7384

7485
```sh
75-
export ZOOM_HOME=${HOME}/zoomus
86+
export TEAMS_HOME=${HOME}/teams
7687
```
7788

7889

@@ -85,42 +96,22 @@ To upgrade to newer releases:
8596
1. Download the updated Docker image:
8697

8798
```bash
88-
docker pull mdouchement/zoom-us:latest
99+
docker pull olberger/teams:latest
89100
```
90101

91102
2. Run `install` to make sure the host scripts are updated.
92103

93104
```bash
94105
docker run -it --rm \
95106
--volume /usr/local/bin:/target \
96-
mdouchement/zoom-us:latest install
107+
olberger/teams:latest install
97108
```
98109

99110
## Uninstallation
100111

101112
```bash
102113
docker run -it --rm \
103114
--volume /usr/local/bin:/target \
104-
mdouchement/zoom-us:latest uninstall
105-
```
106-
107-
## Shell Access
108-
109-
For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version `1.3.0` or higher you can access a running containers shell by starting `bash` using `docker exec`:
110-
111-
```bash
112-
docker exec -it zoomus bash
115+
olberger/teams:latest uninstall
113116
```
114117

115-
## Troubleshooting
116-
117-
- Zoom basic logs:
118-
- `docker logs zoomus`
119-
- `ls -l ${ZOOM_HOME:=$HOME}/.zoom/logs` where you can find application logs.
120-
- Screen sharing:
121-
- Try `xhost +SI:localuser:"$USER"` [#20](https://github.com/mdouchement/docker-zoom-us/issues/20)
122-
- Transparent login form:
123-
- A possible workaround is to right click on the Zoom icon from the taskbar and select "About". The about popup could fix the login form render.
124-
- If `Unrecognized OpenGL version` error is in the logs, it could be an issue with Nvidia drivers [#1](https://github.com/mdouchement/docker-zoom-us/issues/1)
125-
- @mzcu made a fix [mzcu@ee177a5](https://github.com/mzcu/docker-zoom-us/commit/ee177a5e8915a05a51080301996a8ed4b89552ee) that should work
126-
- I recommend you to try his version: https://github.com/mzcu/docker-zoom-us

entrypoint.sh

+30-27
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
#!/bin/bash
22
set -e
33

4+
#set -x
5+
46
USER_UID=${USER_UID:-1000}
57
USER_GID=${USER_GID:-1000}
68

7-
ZOOM_US_USER=zoom
9+
TEAMS_USER=teams
810

9-
install_zoom_us() {
10-
echo "Installing zoom-us-wrapper..."
11-
install -m 0755 /var/cache/zoom-us/zoom-us-wrapper /target/
12-
echo "Installing zoom-us..."
13-
ln -sf zoom-us-wrapper /target/zoom
11+
install_teams() {
12+
echo "Installing teams-wrapper..."
13+
install -m 0755 /var/cache/teams/teams-wrapper /target/
14+
echo "Installing teams..."
15+
ln -sf teams-wrapper /target/teams
1416
}
1517

16-
uninstall_zoom_us() {
17-
echo "Uninstalling zoom-us-wrapper..."
18-
rm -rf /target/zoom-us-wrapper
19-
echo "Uninstalling zoom-us..."
20-
rm -rf /target/zoom
18+
uninstall_teams() {
19+
echo "Uninstalling teams-wrapper..."
20+
rm -rf /target/teams-wrapper
21+
echo "Uninstalling teams..."
22+
rm -rf /target/teams
2123
}
2224

2325
create_user() {
2426
# create group with USER_GID
25-
if ! getent group ${ZOOM_US_USER} >/dev/null; then
26-
groupadd -f -g ${USER_GID} ${ZOOM_US_USER} >/dev/null 2>&1
27+
if ! getent group ${TEAMS_USER} >/dev/null; then
28+
groupadd -f -g ${USER_GID} ${TEAMS_USER} >/dev/null 2>&1
2729
fi
2830

2931
# create user with USER_UID
30-
if ! getent passwd ${ZOOM_US_USER} >/dev/null; then
32+
if ! getent passwd ${TEAMS_USER} >/dev/null; then
3133
adduser --disabled-login --uid ${USER_UID} --gid ${USER_GID} \
32-
--gecos 'ZoomUs' ${ZOOM_US_USER} >/dev/null 2>&1
34+
--gecos 'Teams' ${TEAMS_USER} >/dev/null 2>&1
3335
fi
34-
chown ${ZOOM_US_USER}:${ZOOM_US_USER} -R /home/${ZOOM_US_USER}
35-
adduser ${ZOOM_US_USER} sudo
36+
chown ${TEAMS_USER}:${TEAMS_USER} -R /home/${TEAMS_USER}
37+
adduser ${TEAMS_USER} sudo
3638
}
3739

3840
grant_access_to_video_devices() {
@@ -42,33 +44,34 @@ grant_access_to_video_devices() {
4244
VIDEO_GID=$(stat -c %g $device)
4345
VIDEO_GROUP=$(stat -c %G $device)
4446
if [[ ${VIDEO_GROUP} == "UNKNOWN" ]]; then
45-
VIDEO_GROUP=zoomusvideo
47+
VIDEO_GROUP=teamsvideo
4648
groupadd -g ${VIDEO_GID} ${VIDEO_GROUP}
4749
fi
48-
usermod -a -G ${VIDEO_GROUP} ${ZOOM_US_USER}
50+
usermod -a -G ${VIDEO_GROUP} ${TEAMS_USER}
4951
break
5052
fi
5153
done
5254
}
5355

54-
launch_zoom_us() {
55-
cd /home/${ZOOM_US_USER}
56-
exec sudo -HEu ${ZOOM_US_USER} PULSE_SERVER=/run/pulse/native QT_GRAPHICSSYSTEM="native" xcompmgr -c -l0 -t0 -r0 -o.00 &
57-
exec sudo -HEu ${ZOOM_US_USER} PULSE_SERVER=/run/pulse/native QT_GRAPHICSSYSTEM="native" $@
56+
launch_bash() {
57+
cd /home/${TEAMS_USER}
58+
# exec sudo -HEu ${TEAMS_USER} PULSE_SERVER=/run/pulse/native QT_GRAPHICSSYSTEM="native" xcompmgr -c -l0 -t0 -r0 -o.00 &
59+
# exec sudo -HEu ${TEAMS_USER} PULSE_SERVER=/run/pulse/native QT_GRAPHICSSYSTEM="native" $@
60+
exec sudo -HEu ${TEAMS_USER} PULSE_SERVER=/run/pulse/native QT_GRAPHICSSYSTEM="native" /bin/bash
5861
}
5962

6063
case "$1" in
6164
install)
62-
install_zoom_us
65+
install_teams
6366
;;
6467
uninstall)
65-
uninstall_zoom_us
68+
uninstall_teams
6669
;;
67-
zoom)
70+
bash)
6871
create_user
6972
grant_access_to_video_devices
7073
echo "$1"
71-
launch_zoom_us $@
74+
launch_bash $@
7275
;;
7376
*)
7477
exec $@

0 commit comments

Comments
 (0)