forked from PolymerLabs/arcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.CI
57 lines (46 loc) · 1.6 KB
/
Dockerfile.CI
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
FROM ubuntu:xenial
# Install programs for runtime use (e.g. by Bazel, Node-GYP)
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
apt-transport-https \
bash \
ca-certificates \
curl \
g++ \
git \
lbzip2 \
make \
nodejs \
openjdk-8-jdk \
python \
unzip \
xz-utils
# Install Chrome for Selenium
# Reference: https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get -y update && apt-get -y install google-chrome-stable
# Install Selenium
RUN curl https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip -o /usr/bin/chromedriver_linux64.zip
RUN unzip /usr/bin/chromedriver_linux64.zip -d /usr/bin/chromedriver
RUN chmod +x /usr/bin/chromedriver
# Set up workspace
ENV WORKSPACE /usr/src/app
RUN mkdir -p $WORKSPACE
WORKDIR $WORKSPACE
# Install Bazel
COPY tools/install_bazel.sh $WORKSPACE/tools/install_bazel.sh
RUN ./tools/install_bazel.sh
ENV PATH="/root/bin:${PATH}"
# Install ktlint
RUN (cd /usr/bin/ && curl -L -s -O https://github.com/pinterest/ktlint/releases/download/0.35.0/ktlint && cd -)
RUN chmod +x /usr/bin/ktlint
# Install Nodejs & npm
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
# Install Project
COPY package.json $WORKSPACE/package.json
RUN npm install
# Create bazel cache directory
RUN mkdir -p /disk-cache/
########
COPY . .