In mozilla.support.firefox, L.R.H. <
l.r.h....@crimsontide.edu> wrote:
> I don't want firefox to create a ~/.mozilla directory.
>
> But this sequence below always *creates* a ~/.mozilla directory!
> $ rm -rf ~/.mozilla
> $ mkdir -p /tmp/firefox/default_profile/extensions
> $ /usr/lib/firefox/firefox -new-instance -profile /tmp/firefox/default_profile &
>
> What am I doing wrong?
Stick that shit in a Docker container. Here's mine. (Warning, long
lines.) You'll want to adjust the container mountpoint where I have:
$HOME/.mozilla:/firefox/.mozilla
The format is OUTSIDE:INSIDE. My container creates a "firefox" user
with group 500 (named "ffuser") which has a home directory of /firefox.
And, of course, adjust your firefox source (mine is /usr/lib/firefox-44
outside the container), or just run the one installed in the container
if you don't want to control versions explicitly.
$ cat ~/docker/ffdocker/Dockerfile
# first open X11 to local connections
# xhost +local:docker
# mkdir /tmp/downloads && chmod 777 /tmp/downloads # create
# /tmp/downloads
#
# then run with
# docker run -it --net host \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v /tmp/downloads:/firefox/Downloads \
# -v $HOME/.mozilla:/firefox/.mozilla \
# -v /usr/lib/firefox-44:/usr/lib/firefox-latest \
# -e DISPLAY=$DISPLAY \
# --name Firefox \
# ffdocker
#
# -i keep stdin in open
# -t allocate a pseudo-TTY
# --net host: all container networking
# comes from the host
# -v /tmp/.X11-unix:/tmp/.X11-unix mount the tmp dir with live X11 sockets
# inside the container
# -e DISPLAY=$DISPLAY copy the DISPLAY envirnment variable
# --name Firefox give our container a name (must be
# locally unique)
# ffdocker container to run
FROM ubuntu
MAINTAINER <m...@invalid.invalid>
# intall to get dependencies, but then run the version mounted on
# the command line
# also create a "firefox" user with my <s>user</s>/group ID
# Find font packages:
# dpkg --get-selections |grep font
# (edit the "install" selector off each line)
# for p in (each) ; do dpkg-query -L $p | grep -qi '[.]ttf$' && echo $p ; done
RUN apt-get install -y --no-install-recommends firefox && groupadd -g 500 ffuser && useradd -g 500 -d /firefox -m firefox && apt-get install -y FONTLISTHERE
USER firefox
ENTRYPOINT [ "/usr/lib/firefox-latest/firefox" ]
CMD [ "-ProfileManager", "-no-remote" ]
# end of docker file
$
Elijah
------
did not find any pre-built Docker containers to do this