Created
August 13, 2014 12:59
-
-
Save jdecool/4abfbc38c8fb36d69040 to your computer and use it in GitHub Desktop.
Draft of a Dockerfile to run Behat test
This file contains hidden or 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
FROM debian:wheezy | |
MAINTAINER Jérémy DECOOL <[email protected]> | |
# Upgrade system | |
RUN apt-get update | |
RUN apt-get install build-essential vim htop curl unzip wget -y | |
# Java | |
RUN apt-get install openjdk-7-jre -y | |
# NodeJS | |
RUN \ | |
cd /tmp && \ | |
wget "http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz" && \ | |
tar xf node-v0.10.30.tar.gz && \ | |
cd node-v0.10.30 && \ | |
./configure && \ | |
make && \ | |
make install && \ | |
cd /tmp && rm -Rf node* | |
# Selenium | |
RUN \ | |
cd /tmp && \ | |
wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar && \ | |
mkdir /usr/lib/selenium && \ | |
cd /usr/lib/selenium && \ | |
cp /tmp/selenium-server-standalone-2.42.2.jar . && \ | |
mkdir -p /var/log/selenium/ && \ | |
chmod a+w /var/log/selenium/ && \ | |
rm /tmp/selenium-server-standalone-2.42.2.jar | |
# PhantomJS | |
RUN \ | |
apt-get install libfontconfig1 -y && \ | |
npm install -g phantomjs && \ | |
mkdir -p /var/log/phantomjs/ && \ | |
chmod a+w /var/log/phantomjs/ | |
# PHP | |
RUN apt-get install php5-cli php5-mysqlnd php5-intl php5-curl -y | |
# Start services | |
EXPOSE 4444 | |
EXPOSE 8643 | |
CMD ["java", "-jar" ,"/usr/lib/selenium/selenium-server-standalone-2.42.2.jar", "-port", "4444", ">", "/var/log/selenium/selenium-output.log", "2>", "/var/log/selenium/selenium-error.log", "&"] | |
CMD ["/usr/local/bin/phantomjs", "--webdriver=8643", ">", "/var/log/phantomjs/phantomjs-output.log", "2>", "/var/log/phantomjs/phantomjs-error.log", "&"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment