From f83bb3f56167f30f91b5ab30411525fdfa54d300 Mon Sep 17 00:00:00 2001 From: Tiago Jacobs Date: Wed, 8 Apr 2020 01:36:27 -0300 Subject: [PATCH] Fix BBB 2.2 docker --- Dockerfile | 7 +++++++ docker-compose.yml | 48 +++++++++++++++++++++++----------------------- rc.local | 3 +-- setup.sh | 21 ++++---------------- 4 files changed, 36 insertions(+), 43 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8a4205..2483abc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,13 @@ RUN mkdir /opt/docker-bbb/ RUN wget https://raw.githubusercontent.com/bigbluebutton/bbb-install/master/bbb-install.sh -O- | sed 's|https://\$PACKAGE_REPOSITORY|http://\$PACKAGE_REPOSITORY|g' > /opt/docker-bbb/bbb-install.sh RUN chmod 755 /opt/docker-bbb/bbb-install.sh ADD setup.sh /opt/docker-bbb/setup.sh + +RUN useradd bbb --uid 1000 -s /bin/bash +RUN mkdir /home/bbb +RUN chown bbb /home/bbb +RUN sh -c 'echo "bbb ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/bbb' +RUN sh -c 'echo "bbb:bbb" | chpasswd' + ADD rc.local /etc/ RUN chmod 755 /etc/rc.local diff --git a/docker-compose.yml b/docker-compose.yml index daf55e7..e361661 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ networks: backend: services: - bbb: + bbb22: build: . privileged: true environment: @@ -18,7 +18,7 @@ services: tmpfs: - /run - /run/lock - - /tmp + - /tmp:exec,mode=777 volumes: - ./certs/:/local/certs/ - /var/run/docker.sock:/var/run/docker.sock @@ -28,26 +28,26 @@ services: networks: - backend - mac_proxy: - build: mac-vpn/ - ports: - - "127.0.0.1:13194:13194" - command: TCP-LISTEN:13194,fork TCP:172.17.0.1:1194 - restart: always - networks: - - backend +# mac_proxy: +# build: mac-vpn/ +# ports: +# - "127.0.0.1:13194:13194" +# command: TCP-LISTEN:13194,fork TCP:172.17.0.1:1194 +# restart: always +# networks: +# - backend - mac_openvpn: - image: kylemanna/openvpn - volumes: - - ./mac-vpn:/local - - ./mac-vpn/config:/etc/openvpn - network_mode: host - privileged: true - cap_add: - - NET_ADMIN - environment: - dest: docker-for-mac.ovpn - DEBUG: '1' - command: /local/helpers/run-vpn.sh - restart: always +# mac_openvpn: +# image: kylemanna/openvpn +# volumes: +# - ./mac-vpn:/local +# - ./mac-vpn/config:/etc/openvpn +# network_mode: host +# privileged: true +# cap_add: +# - NET_ADMIN +# environment: +# dest: docker-for-mac.ovpn +# DEBUG: '1' +# command: /local/helpers/run-vpn.sh +# restart: always diff --git a/rc.local b/rc.local index bb8169c..847b148 100644 --- a/rc.local +++ b/rc.local @@ -1,4 +1,3 @@ #!/bin/sh -/bin/mount -o remount,exec /tmp +/usr/bin/bbb-conf --restart -[ ! -f /opt/docker-bbb/setup-executed ] && /opt/docker-bbb/setup.sh diff --git a/setup.sh b/setup.sh index ff30b4b..0a87d58 100755 --- a/setup.sh +++ b/setup.sh @@ -21,32 +21,19 @@ set -x cd "$(dirname "$0")" -useradd bbb --uid 1099 -s /bin/bash -mkdir /home/bbb -chown bbb /home/bbb -echo "bbb ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/bbb - -echo "bbb:bbb" | chpasswd - -# Allow to have executable files in /tmp/ folder (tomcat JNA) -mount /tmp -o remount,exec - ./bbb-install.sh -d -s "`hostname -f`" -v xenial-220 -a sed -i 's/::/0.0.0.0/g' /opt/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml -# Repository is broken (remove it later) -cd /usr/local/bigbluebutton/bbb-webrtc-sfu/ -npm install --unsafe-perm - # Restart bbb-conf --restart +# Disable auto start +find /etc/systemd/ | grep wants | xargs -r -n 1 basename | grep service | grep -v networking | grep -v tty | xargs -r -n 1 -I __ systemctl disable __ +systemctl disable tomcat7 + # Update files updatedb -# Tell system to not run this script again -touch /opt/docker-bbb/setup-executed - echo "BBB configuration completed."; exit 0;