2019-09-17 03:18:07 +02:00
|
|
|
FROM ubuntu:bionic
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2016-04-06 12:32:01 +02:00
|
|
|
|
2019-09-17 03:18:07 +02:00
|
|
|
# https://gerrit.googlesource.com/gitiles/
|
2020-05-15 08:13:42 +02:00
|
|
|
ENV GITILES_VERSION v0.4
|
2017-05-31 05:12:55 +02:00
|
|
|
|
2019-09-17 03:18:07 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
apt-transport-https \
|
2017-05-31 05:12:55 +02:00
|
|
|
bash \
|
2019-07-26 18:24:35 +02:00
|
|
|
ca-certificates \
|
2019-09-17 03:18:07 +02:00
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
gnupg \
|
|
|
|
openjdk-8-jdk \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2017-02-12 19:25:18 +01:00
|
|
|
|
2017-05-31 05:12:55 +02:00
|
|
|
# install bazel
|
|
|
|
RUN set -x \
|
2019-09-17 03:18:07 +02:00
|
|
|
&& echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
|
|
|
|
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
|
|
|
|
&& apt-get update && apt-get install -y \
|
|
|
|
bazel \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2017-05-31 05:12:55 +02:00
|
|
|
&& : install Bazel to build gitiles \
|
2019-07-26 18:24:35 +02:00
|
|
|
&& git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
2017-02-12 19:25:18 +01:00
|
|
|
&& ( \
|
|
|
|
cd /usr/src/gitiles \
|
2019-09-17 03:18:07 +02:00
|
|
|
&& bazel build java/com/google/gitiles/dev \
|
2017-05-31 05:12:55 +02:00
|
|
|
&& cp -rL bazel-bin bin \
|
|
|
|
&& rm -rf bazel-bin \
|
2017-02-12 19:25:18 +01:00
|
|
|
) \
|
2017-05-31 05:12:55 +02:00
|
|
|
&& : clean up unneeded packages and files \
|
2019-09-17 03:18:07 +02:00
|
|
|
&& apt purge -y --auto-remove bazel \
|
|
|
|
&& rm /etc/apt/sources.list.d/bazel.list
|
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" ]
|