Created
October 3, 2015 09:23
-
-
Save vikstrous/c9def0160fa196a1634a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was really painful. My first success: | |
Dockerfile: | |
# Base docker image | |
FROM debian:sid | |
MAINTAINER Jessica Frazelle <[email protected]> | |
ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /src/google-talkplugin_current_amd64.deb | |
ADD https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb /src/google-chrome-stable_current_amd64.deb | |
# Install Chromium | |
RUN mkdir -p /usr/share/icons/hicolor && \ | |
apt-get update && apt-get install -y \ | |
strace \ | |
ca-certificates \ | |
gconf-service \ | |
hicolor-icon-theme \ | |
libappindicator1 \ | |
libasound2 \ | |
libcanberra-gtk-module \ | |
libcurl3 \ | |
libexif-dev \ | |
libgconf-2-4 \ | |
libgl1-mesa-dri \ | |
libgl1-mesa-glx \ | |
libnspr4 \ | |
libnss3 \ | |
libpango1.0-0 \ | |
libv4l-0 \ | |
libxss1 \ | |
libxtst6 \ | |
wget \ | |
xdg-utils \ | |
--no-install-recommends && \ | |
dpkg -i '/src/google-chrome-stable_current_amd64.deb' && \ | |
dpkg -i '/src/google-talkplugin_current_amd64.deb' \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN useradd -d /home/v -m v | |
COPY local.conf /etc/fonts/local.conf | |
# Autorun chrome | |
CMD [ "--user-data-dir=/data" ] | |
start script: | |
docker run -it \ | |
--rm \ | |
--net host \ | |
--cpuset-cpus 0 \ | |
--memory 512mb \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v /home/v:/home/v \ | |
-e DISPLAY=unix$DISPLAY \ | |
-e XAUTHORITY=$XAUTHORITY \ | |
-v $HOME/Downloads:/root/Downloads \ | |
-v $HOME/.config/google-chrome/:/data \ | |
-v /dev/shm \ | |
-v /sys/fs/cgroup:/sys/fs/cgroup \ | |
--device /dev/snd \ | |
--name chrome \ | |
--privileged \ | |
--cap-add CAP_SYS_ADMIN \ | |
chrome '/sbin/init' | |
Than I had to exec into it and run this: | |
/usr/bin/google-chrome --no-sandbox --user-data-dir /home/v | |
The next step is to figure out which of the hacks I did were actually necessary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment