-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (23 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
23 lines (23 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM debian:stretch-slim
ENV USER=firefox
ENV GUID=1000
RUN mkdir -p /src
RUN apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates apt-utils wget --no-install-recommends
RUN apt-get install -y firefox-esr libnss3-tools openssl procps sudo --no-install-recommends
RUN apt-get install -y python2.7 libpython2.7-minimal libpython2.7-stdlib python-openssl zenity libgtk2.0-0 pulseaudio dbus cgmanager consolekit openssh-client --no-install-recommends
RUN apt-get install -y dialog
RUN mkdir -p /home/firefox
COPY startup.sh /home/firefox
RUN chmod 744 /home/firefox/startup.sh \
&& groupadd -g ${GUID} -r ${USER} \
&& useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \
&& chown -R ${GUID}:${GUID} /home/${USER} \
&& echo 'firefox ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'Defaults !requiretty' >> /etc/sudoers \
&& apt-get purge --auto-remove -y \
&& rm -rf /var/lib/apt/lists/*
RUN service dbus start
# Run Firefox as non privileged user
USER firefox
# Autorun Firefox
CMD [ "/home/firefox/startup.sh" ]