This repository has been archived by the owner on Jul 26, 2018. It is now read-only.
forked from web-platform-tests/results-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.base
108 lines (90 loc) · 2.93 KB
/
Dockerfile.base
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
FROM gcr.io/cloud-solutions-images/jenkins-k8s-slave
USER root
ARG PB_VERSION=3.4.0
ARG GO_VERSION=1.8.5
ENV USER_HOME="/home/jenkins"
ENV WPTD_PATH="${USER_HOME}/wptdashboard"
ENV WPT_PATH="${USER_HOME}/web-platform-tests"
ENV WPTD_OUT_PATH="${USER_HOME}/wptdout"
RUN apt-get update
# Install git, python-pip, virtualenv and unzip for setup below
RUN apt-get install --assume-yes --no-install-suggests \
--no-install-recommends \
git \
make \
python-pip \
python-wheel \
python-setuptools \
virtualenv \
unzip \
dtrx
# Needed for hosts_fixup
RUN apt-get install --assume-yes --no-install-suggests \
--no-install-recommends \
sudo
# Used for running FF and Chrome
RUN apt-get install --assume-yes --no-install-suggests \
--no-install-recommends \
xauth \
xvfb
# Used for running FF
RUN apt-get install --assume-yes --no-install-suggests \
--no-install-recommends \
libnss3-tools \
libgtk-3-common \
libdbus-glib-1-2
# Remove unwanted pre-installed Python packages
RUN apt-get remove --assume-yes \
bzr \
python-bzrlib \
python-configobj \
python-six \
mercurial \
mercurial-common
# Install golang
RUN mkdir /go-fetch
WORKDIR /go-fetch
RUN curl -L -o "go.tar.gz" "https://redirector.gvt1.com/edgedl/go/go${GO_VERSION}.linux-amd64.tar.gz" && \
tar -C /usr/local -xzf "go.tar.gz" && \
cd / && \
rm -rf /go-fetch
# Setup go environment
RUN mkdir "${USER_HOME}/go"
ENV GOPATH="${USER_HOME}/go"
ENV WPTD_GO_PATH="${GOPATH}/src/github.com/w3c/wptdashboard"
# Setup go + python binaries path
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin:${USER_HOME}/.local/bin
# Install go dependencies
RUN go get \
github.com/golang/lint/golint \
github.com/GoogleCloudPlatform/protoc-gen-bq-schema/protos
# Install protobuf libraries
RUN mkdir /protobuf-fetch
WORKDIR /protobuf-fetch
RUN curl -L -o "protobuf.zip" "https://github.com/google/protobuf/archive/v${PB_VERSION}.zip" && \
unzip "protobuf.zip" -d / && \
mv "/protobuf-${PB_VERSION}" "${USER_HOME}/protobuf" && \
cd / && \
rm -rf /protobuf-fetch
# Install protobuf compiler
RUN mkdir /protoc
WORKDIR /protoc
RUN curl -L -o "protoc.zip" "https://github.com/google/protobuf/releases/download/v${PB_VERSION}/protoc-${PB_VERSION}-linux-x86_64.zip" && \
unzip "protoc.zip" && \
cp "bin/protoc" /usr/local/bin/ && \
chmod a+rx "/usr/local/bin/protoc" && \
cd / && \
rm -rf /protoc
# Install protobuf BigQuery schema generator
ENV BQ_SCHEMA_PATH="github.com/GoogleCloudPlatform/protoc-gen-bq-schema"
RUN go get ${BQ_SCHEMA_PATH}
WORKDIR ${GOPATH}/src/${BQ_SCHEMA_PATH}
# Copy executable to bin dir
RUN make && \
cp "bin/protoc-gen-bq-schema" /usr/local/bin/ && \
chmod a+rx "/usr/local/bin/protoc-gen-bq-schema"
# Copy src to working/git dir
RUN cp -r ${GOPATH}/src/${BQ_SCHEMA_PATH} ${USER_HOME}/protoc-gen-bq-schema
RUN mkdir "${WPTD_PATH}"
RUN mkdir "${WPT_PATH}"
WORKDIR "${WPTD_PATH}"