# Run Chrome in a container
#
# docker run -it \
# --net host \ # may as well YOLO
# --cpuset-cpus 0 \ # control the cpu
# --memory 512mb \ # max memory it can use
# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
# -e DISPLAY=unix$DISPLAY \
# -v $HOME/Downloads:/root/Downloads \
# -v $HOME/.config/google-chrome/:/data \ # if you want to save state
# --device /dev/snd \ # so we have sound
# -v /dev/shm:/dev/shm \
# --name chrome \
# jess/chrome
#
# Base docker image
FROM ubuntu
MAINTAINER joshua
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN:zh
RUN locale-gen zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENV TZ=Asia/Shanghai
RUN locale-gen zh_CN.UTF-8 &&\
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
RUN mkdir -p /etc/apt/
ADD sources.list /etc/apt/sources.list
# Install Chrome
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list &&\
apt-get update &&\
mkdir -p /opt/google/chrome/PepperFlash/ &&\
useradd joshua &&\
apt-get install -y --allow-unauthenticated google-chrome-stable pepperflashplugin-nonfree
# Autorun chrome
ENTRYPOINT [ "google-chrome" ]
CMD [ "--user-data-dir=/data" ]
#
# docker run -it \
# --net host \ # may as well YOLO
# --cpuset-cpus 0 \ # control the cpu
# --memory 512mb \ # max memory it can use
# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
# -e DISPLAY=unix$DISPLAY \
# -v $HOME/Downloads:/root/Downloads \
# -v $HOME/.config/google-chrome/:/data \ # if you want to save state
# --device /dev/snd \ # so we have sound
# -v /dev/shm:/dev/shm \
# --name chrome \
# jess/chrome
#
# Base docker image
FROM ubuntu
MAINTAINER joshua
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN:zh
RUN locale-gen zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENV TZ=Asia/Shanghai
RUN locale-gen zh_CN.UTF-8 &&\
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
RUN mkdir -p /etc/apt/
ADD sources.list /etc/apt/sources.list
# Install Chrome
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list &&\
apt-get update &&\
mkdir -p /opt/google/chrome/PepperFlash/ &&\
useradd joshua &&\
apt-get install -y --allow-unauthenticated google-chrome-stable pepperflashplugin-nonfree
# Autorun chrome
ENTRYPOINT [ "google-chrome" ]
CMD [ "--user-data-dir=/data" ]