first commit

This commit is contained in:
Andy 2016-03-23 21:46:30 +01:00
parent dc45cfe727
commit c87ae39d66
Signed by: arno
GPG Key ID: 368DDA2E9A471EAC
4 changed files with 91 additions and 0 deletions

42
Dockerfile Normal file
View File

@ -0,0 +1,42 @@
# 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" ]

7
README.md Normal file
View File

@ -0,0 +1,7 @@
Readme
======
Launching the Google Chrome
```
docker-compose up -d
```

13
asoundrc Normal file
View File

@ -0,0 +1,13 @@
# To find your card
# aplay -l
# speaker-test -D plughw:CARD=PCH -l 1 -t sine
# defaults.pcm.!card PCH
# defaults.pcm.!device 0
# defaults.pcm.!ctl PCH
# defaults.pcm.card 1
# defaults.ctl.card 1
defaults.pcm.card plughw:PCH
defaults.ctl.card plughw:PCH

29
docker-compose.yml Normal file
View File

@ -0,0 +1,29 @@
version: '2'
services:
chrome:
build: ./
read_only: true
networks:
- net
- pulseaudio
devices:
- /dev/dri
# - /dev/shm
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /tmp/krb5cc_1000:/tmp/krb5cc_1000:ro
- /var/run/cups:/var/run/cups:ro
- $HOME/.config/google-chrome/:/data
- $HOME/Downloads:/home/chrome/Downloads
environment:
DISPLAY: unix$DISPLAY
PULSE_SERVER: tcp:pulseaudio:4713
cap_add:
- SYS_ADMIN
networks:
net: {}
pulseaudio:
external:
name: pulseaudio_net