2017-02-12 20:02:27 +01:00
|
|
|
FROM java:8
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2016-04-06 12:32:01 +02:00
|
|
|
|
2017-02-12 20:02:27 +01:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
ca-certificates \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-02-12 19:25:18 +01:00
|
|
|
# install bazel
|
2016-04-06 19:21:51 +02:00
|
|
|
RUN buildDeps=' \
|
2016-06-17 02:23:25 +02:00
|
|
|
curl \
|
2016-04-06 19:21:51 +02:00
|
|
|
' \
|
2017-02-12 20:02:27 +01:00
|
|
|
&& set -x \
|
|
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& curl -sSL https://bazel.build/bazel-release.pub.gpg | apt-key add - \
|
|
|
|
&& echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" >> /etc/apt/sources.list.d/bazel.list \
|
|
|
|
&& apt-get update && apt-get install -y \
|
|
|
|
bazel \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
2017-02-12 19:25:18 +01:00
|
|
|
|
|
|
|
# install gitiles
|
|
|
|
RUN buildDeps=' \
|
2017-02-12 20:02:27 +01:00
|
|
|
curl \
|
2017-02-12 19:25:18 +01:00
|
|
|
git \
|
2017-02-12 20:02:27 +01:00
|
|
|
zip \
|
2017-02-12 19:25:18 +01:00
|
|
|
' \
|
|
|
|
set -x \
|
2017-02-12 20:02:27 +01:00
|
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2017-02-12 19:25:18 +01:00
|
|
|
&& git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/gitiles \
|
|
|
|
&& git submodule update --init \
|
|
|
|
&& bazel build //... \
|
|
|
|
) \
|
2017-02-12 20:02:27 +01:00
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
2016-04-06 12:32:01 +02:00
|
|
|
|
2017-02-12 19:25:18 +01:00
|
|
|
COPY start.sh /usr/bin/start.sh
|
2016-04-06 12:32:01 +02:00
|
|
|
|
2017-02-12 19:25:18 +01:00
|
|
|
ENTRYPOINT [ "/usr/bin/start.sh" ]
|