mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-02-11 22:57:48 +01:00
Update firefox image
- Add example usage in such a way that `DIR=firefox make run` work - Use bullseye (stable) instead of sid (unstable) as base-image - Make it possible to change this at buildtime with the buildarg DEBVERSION - Take firefox from bionic (newest LTS) instead of xenial (older LTS) - Make it possible to change this at buildtime with the buildarg UBUVERSION - Use UTF-8 as default LANG - Run it as user "user" with homedir "/home/user" - Make it possible to change this at buildtime with the buildargs USER and HOME
This commit is contained in:
parent
a20a544be1
commit
4224f748b7
|
@ -1,12 +1,24 @@
|
|||
FROM debian:sid-slim
|
||||
#Run firefox in a container:
|
||||
#
|
||||
#docker run -d --rm --net host \
|
||||
# --device /dev/snd --device /dev/dri -v /dev/shm:/dev/shm \
|
||||
# -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY \
|
||||
# -v $HOME/Downloads:/home/user/Downloads \
|
||||
# -v $HOME/.mozilla:/home/user/.mozilla \
|
||||
# --name firefox jess/firefox
|
||||
#
|
||||
|
||||
ARG DEBVERSION=bullseye-slim
|
||||
FROM debian:$DEBVERSION
|
||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||
|
||||
ARG UBUVERSION=bionic
|
||||
RUN apt-get update && apt-get install -y \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
--no-install-recommends \
|
||||
&& 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 \
|
||||
&& echo "deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu ${UBUVERSION} main" >> /etc/apt/sources.list.d/firefox.list \
|
||||
&& apt-get update && apt-get install -y \
|
||||
apulse \
|
||||
ca-certificates \
|
||||
|
@ -23,7 +35,7 @@ RUN apt-get update && apt-get install -y \
|
|||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV LANG en-US
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
COPY local.conf /etc/fonts/local.conf
|
||||
|
||||
|
@ -31,4 +43,10 @@ RUN echo 'pref("browser.tabs.remote.autostart", false);' >> /etc/firefox/syspref
|
|||
|
||||
COPY entrypoint.sh /usr/bin/startfirefox
|
||||
|
||||
ARG USER=user
|
||||
ARG HOME=/home/${USER}
|
||||
RUN useradd --create-home --home-dir $HOME $USER && chown -R ${USER}:${USER} $HOME
|
||||
WORKDIR $HOME
|
||||
USER $USER
|
||||
|
||||
ENTRYPOINT [ "startfirefox" ]
|
||||
|
|
Loading…
Reference in New Issue
Block a user