First version: run Firefox
This commit is contained in:
commit
09176a6b05
|
|
@ -0,0 +1,16 @@
|
|||
FROM ubuntu:bionic
|
||||
|
||||
RUN apt-get update && apt-get install -y firefox
|
||||
RUN export uid=1000 gid=1000 && \
|
||||
mkdir -p /home/user && \
|
||||
echo "user:x:${uid}:${gid}:User,,,:/home/user:/bin/bash" >> /etc/passwd && \
|
||||
echo "user:x:${uid}:" >> /etc/group && \
|
||||
chown ${uid}:${gid} -R /home/user
|
||||
|
||||
USER user
|
||||
|
||||
COPY files/user.js /home/user/
|
||||
COPY files/start.sh /home/user/
|
||||
|
||||
ENV HOME /home/user
|
||||
CMD /bin/bash /home/user/start.sh
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# If no profile ...
|
||||
if [ ! -d "$HOME/.mozilla" ]; then
|
||||
# create the default Firefox profile and put some settings there
|
||||
firefox -CreateProfile default
|
||||
mv $HOME/user.js `find $HOME/.mozilla/firefox -type d | grep .default`
|
||||
fi
|
||||
|
||||
# Start firefox
|
||||
firefox
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// Place in ~/.mozilla/user.js
|
||||
|
||||
// Firefox often crashes without this setting
|
||||
// https://askubuntu.com/questions/966332/firefox-56-0-64-bit-crashing-tabs-after-upgrade
|
||||
user_pref("browser.tabs.remote.autostart", false);
|
||||
Loading…
Reference in New Issue