-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-test
49 lines (35 loc) · 1.01 KB
/
docker-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
FROM nodesource/trusty:6.3.0
RUN apt-get update
RUN apt-get install -qqy software-properties-common
RUN add-apt-repository -y ppa:openjdk-r/ppa
RUN apt-get update
RUN sudo apt-get install --no-install-recommends -y openjdk-8-jre
# install Firefox
RUN apt-get install -qqy firefox
# install xvfb
RUN apt-get install -y xvfb;
# install java; needed by selenium
#RUN apt-get install -y --no-install-recommends default-jre
# Gulp, bower
RUN npm install -g gulp bower polymer-cli
# Source
ADD bower.json /tmp
ADD package.json /tmp
# Dependencies
WORKDIR /tmp
RUN npm install && bower install --allow-root --config.interactive=false -s
# test script
ADD test.sh /test.sh
RUN chmod a+x /test.sh
# add code
ADD . /code/
# remove installed modules for clean setup
RUN rm -rf /code/build/
RUN rm -rf /code/node_modules/
RUN rm -rf /code/bower_modules/
WORKDIR /code
RUN cp -a /tmp/node_modules /code/node_modules
RUN cp -a /tmp/bower_components /code/bower_components
# Run test
#CMD ["xvfb-run", "polymer", "test"]
CMD /test.sh