chrome/Dockerfile

57 lines
2.6 KiB
Docker
Raw Permalink Normal View History

2016-03-23 20:46:30 +00:00
# Run Chrome in a container
2018-12-25 18:06:31 +00:00
FROM ubuntu:bionic
2016-03-23 20:46:30 +00:00
# To avoid problems with Dialog and curses wizards
ENV DEBIAN_FRONTEND noninteractive
# Install GTK, pulseaudio and fonts
RUN apt-get update && \
2017-04-24 14:48:06 +00:00
apt-get -y --no-install-recommends install ca-certificates tzdata \
2016-12-14 16:10:46 +00:00
libcanberra-gtk-module libexif12 pulseaudio attr \
2016-07-17 15:23:54 +00:00
fonts-dejavu-core fonts-freefont-ttf fonts-guru-extra \
fonts-kacst fonts-kacst-one fonts-khmeros-core fonts-lao \
fonts-liberation fonts-lklug-sinhala fonts-lohit-guru \
fonts-nanum fonts-opensymbol fonts-sil-abyssinica \
fonts-sil-padauk fonts-symbola fonts-takao-pgothic \
fonts-tibetan-machine fonts-tlwg-garuda-ttf \
fonts-tlwg-kinnari-ttf fonts-tlwg-laksaman-ttf \
fonts-tlwg-loma-ttf fonts-tlwg-mono-ttf \
fonts-tlwg-norasi-ttf fonts-tlwg-purisa-ttf \
fonts-tlwg-sawasdee-ttf fonts-tlwg-typewriter-ttf \
fonts-tlwg-typist-ttf fonts-tlwg-typo-ttf \
fonts-tlwg-umpush-ttf fonts-tlwg-waree-ttf \
ttf-bitstream-vera ttf-dejavu-core ttf-ubuntu-font-family \
fonts-arphic-ukai fonts-arphic-uming \
fonts-ipafont-mincho fonts-ipafont-gothic \
fonts-unfonts-core && \
rm -rf -- /var/lib/apt/lists /tmp/*.deb
# Obtain Google Chrome
2016-03-23 20:46:30 +00:00
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
# Install Google Chrome and its dependencies
2016-03-23 20:46:30 +00:00
RUN sh -c 'dpkg -i /tmp/google-chrome-stable_current_amd64.deb \
2016-05-07 08:38:37 +00:00
/tmp/google-talkplugin_current_amd64.deb 2>/dev/null; exit 0' && \
apt-get update && \
apt-get -fy install && \
rm -rf -- /var/lib/apt/lists /tmp/*.deb
# Workaround: pulseaudio client library likes to remove /dev/shm/pulse-shm-*
# files created by the host, causing sound to stop working.
# To fix this, we either want to disable the shm or mount /dev/shm
# in read-only mode when starting the container.
RUN echo "enable-shm = no" >> /etc/pulse/client.conf
ENV USER user
ENV GROUPS video,audio
ENV UID 1000
ENV HOME /home/$USER
2016-03-23 20:46:30 +00:00
2018-12-25 18:06:31 +00:00
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin -G $GROUPS $USER
2016-05-07 08:38:37 +00:00
WORKDIR $HOME
2016-12-14 09:25:24 +00:00
COPY launch /launch
ENTRYPOINT [ "sh", "/launch" ]
2018-12-25 18:06:31 +00:00
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"