chrome/Dockerfile
2016-03-23 21:47:20 +01:00

43 lines
1.5 KiB
Docker

# Run Chrome in a container
FROM debian:jessie
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
# To avoid problems with Dialog and curses wizards
ENV DEBIAN_FRONTEND noninteractive
ENV USER chrome
ENV GROUPS video,audio
ENV UID 1000
ENV HOME /home/$USER
ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /tmp/google-talkplugin_current_amd64.deb
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /tmp/google-chrome-stable_current_amd64.deb
RUN sh -c 'dpkg -i /tmp/google-chrome-stable_current_amd64.deb \
/tmp/google-talkplugin_current_amd64.deb 2>/dev/null; exit 0' \
&& apt-get update \
&& apt-get -fy install \
&& apt-get install -y libcanberra-gtk-module libexif12 pulseaudio \
&& rm -rf -- /var/lib/apt/lists /tmp/*.deb
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin $USER \
&& usermod -aG $GROUPS $USER \
&& su -s /bin/sh -l $USER -c 'mkdir -p $HOME/.pki/nssdb $HOME/.local'
# if you don't want pulseaudio, uncomment the following lines
# COPY asoundrc /etc/asound.conf
# RUN chgrp audio /etc/asound.conf && chmod 0640 /etc/asound.conf
# for some unknown reason the ownCloud's (v9.0.0) calendar (v1.0.0.0) doesn't
# show up the calendars when the time is set to UTC/Zulu
RUN echo "CET" > /etc/timezone \
&& dpkg-reconfigure tzdata
USER $USER
VOLUME [ "$HOME/.pki/nssdb", \
"$HOME/.local", \
"/tmp" ]
ENTRYPOINT [ "/usr/bin/google-chrome" ]
CMD [ "--user-data-dir=/data" ]
# "--no-sandbox" ]