# # Ubuntu Dockerfile # # https://github.com/dockerfile/ubuntu # # Pull base image. FROM ubuntu:16.04 ADD xvfb /etc/init.d/xvfb # Install. RUN \ sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ apt-get update && \ apt-get -y upgrade && \ apt-get install -y wget && \ # Chrome PPA wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \ apt-get update && \ apt-get install -y google-chrome-stable && \ # Virtual display apt-get install -y xvfb && \ # OpenGL implementation for for Chrome apt-get install -y libosmesa6 && \ # ImageMagick for taking screenshots apt-get install -y imagemagick && \ # Link Mesa driver ln -s /usr/lib/x86_64-linux-gnu/libOSMesa.so.6 /opt/google/chrome/libosmesa.so && \ # Make Xvfb daemon script executable chmod +x /etc/init.d/xvfb ENV HOME /root # Export the virtual display Xvfb creates ENV DISPLAY :1 # Define default command. CMD ["bash"]