diff --git a/firefox/Dockerfile b/firefox/Dockerfile index 3dc62b1..8a4e519 100644 --- a/firefox/Dockerfile +++ b/firefox/Dockerfile @@ -8,12 +8,14 @@ RUN apt-get update && apt-get install -y \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0AB215679C571D1C8325275B9BDB3D89CE49EC21 \ && echo "deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial main" >> /etc/apt/sources.list.d/firefox.list \ && apt-get update && apt-get install -y \ + apulse \ ca-certificates \ firefox \ hicolor-icon-theme \ libasound2 \ libgl1-mesa-dri \ libgl1-mesa-glx \ + libpulse0 \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* @@ -21,4 +23,10 @@ ENV LANG en-US COPY local.conf /etc/fonts/local.conf -ENTRYPOINT [ "/usr/bin/firefox" ] +RUN echo 'pref("browser.tabs.remote.autostart", false);' >> /etc/firefox/syspref.js + +RUN echo "#! /bin/bash \n\ +[ -e /dev/snd ] && exec apulse firefox || exec firefox \n\ +" >/usr/local/bin/startfirefox && chmod +x /usr/local/bin/startfirefox + +ENTRYPOINT [ "/usr/local/bin/startfirefox" ]