forked from vfarcic/books-ms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
61 lines (47 loc) · 1.84 KB
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM debian:jessie
MAINTAINER Viktor Farcic "[email protected]"
ENV VERSION 1.0
RUN apt-get update
# CUrl
RUN apt-get -y install curl
# Dependencies
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN echo "deb http://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
RUN curl -sL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
RUN echo "deb http://packages.linuxmint.com debian import" >> /etc/apt/sources.list
# Mongo, NodeJS, Git, SBT, xvfb, FireFox, Chrome
RUN apt-get update && \
apt-get -y --fix-missing install wget bzip2 make g++ && \
apt-get -y --force-yes --fix-missing install --no-install-recommends mongodb nodejs git sbt=0.13.13 xvfb firefox google-chrome-stable && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Scala
RUN curl -O -q http://downloads.typesafe.com/scala/2.11.5/scala-2.11.5.deb && \
dpkg -i scala-2.11.5.deb && \
rm scala-2.11.5.deb
# Gulp, bower
RUN npm install -g gulp bower
# Dirs
RUN mkdir /source
RUN mkdir -p /data/db
ADD project /source/project
ADD build.sbt /source/build.sbt
ADD client/bower.json /source/client/bower.json
ADD client/gulpfile.js /source/client/gulpfile.js
ADD client/package.json /source/client/package.json
ADD client/wct.conf.js /source/client/wct.conf.js
ADD client/test.html /source/client/test.html
ADD run_tests.sh /source/run_tests.sh
# Dependencies
RUN cd /source && sbt update
RUN cd /source/client && npm install && bower install --allow-root --config.interactive=false -s
# Envs
ENV TEST_TYPE "spec"
ENV DOMAIN "http://172.17.42.1"
ENV DISPLAY ":1.0"
ENV DB_HOST localhost
WORKDIR /source
VOLUME ["/source", "/source/target/scala-2.10", "/root/.ivy2/cache", "/data/db"]
CMD ["/source/run_tests.sh"]
EXPOSE 8080