Last active
February 1, 2016 13:38
-
-
Save hiviah/0b5b62cf7d163f7d9b9c to your computer and use it in GitHub Desktop.
Dockerfile for Chrome on Ubuntu
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
# Pull base image. | |
FROM ubuntu | |
# Setup user with the same UID/GID as on your host system to make X session work over socket | |
RUN export uid=1000 gid=1000 && \ | |
mkdir -p /home/developer && \ | |
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ | |
echo "developer:x:${uid}:" >> /etc/group && \ | |
chown ${uid}:${gid} -R /home/developer | |
# Install Chrome | |
RUN \ | |
apt-get install -y wget && \ | |
wget -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \ | |
apt-get update && \ | |
apt-get install -y google-chrome-stable | |
# Define working directory. | |
WORKDIR /home/developer | |
# Define default command. | |
CMD ["bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment