mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
gitiles
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
9819aa12b6
commit
b7c09d20ab
|
@ -1,55 +1,41 @@
|
||||||
FROM java:8-alpine
|
FROM java:8
|
||||||
MAINTAINER Jessie Frazelle <jess@linux.com>
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
||||||
|
|
||||||
# install bazel
|
RUN apt-get update && apt-get install -y \
|
||||||
ENV BAZEL_VERSION 0.4.4
|
ca-certificates \
|
||||||
RUN buildDeps=' \
|
--no-install-recommends \
|
||||||
bash \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
build-base \
|
|
||||||
curl \
|
|
||||||
gnupg \
|
|
||||||
linux-headers \
|
|
||||||
zip \
|
|
||||||
' \
|
|
||||||
set -x \
|
|
||||||
&& apk --no-cache add $buildDeps \
|
|
||||||
&& curl -sSL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip" -o "/tmp/bazel-${BAZEL_VERSION}-dist.zip" \
|
|
||||||
&& curl -sSL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip.sig" -o "/tmp/bazel-${BAZEL_VERSION}-dist.zip.sig" \
|
|
||||||
&& curl -sSL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip.sha256" -o "/tmp/bazel-${BAZEL_VERSION}-dist.zip.sha256" \
|
|
||||||
&& export GNUPGHOME="$(mktemp -d)" \
|
|
||||||
&& curl -sSL "https://bazel.build/bazel-release.pub.gpg" | gpg --no-tty --import \
|
|
||||||
&& gpg --batch --verify "/tmp/bazel-${BAZEL_VERSION}-dist.zip.sig" "/tmp/bazel-${BAZEL_VERSION}-dist.zip" \
|
|
||||||
&& ( \
|
|
||||||
cd /tmp \
|
|
||||||
&& cat "bazel-${BAZEL_VERSION}-dist.zip.sha256" | sha256sum -c - \
|
|
||||||
) \
|
|
||||||
&& rm -r "$GNUPGHOME" "/tmp/bazel-${BAZEL_VERSION}-dist.zip.sig" "/tmp/bazel-${BAZEL_VERSION}-dist.zip.sha256" \
|
|
||||||
&& mkdir -p /tmp/bazel \
|
|
||||||
&& unzip "/tmp/bazel-${BAZEL_VERSION}-dist.zip" -d /tmp/bazel \
|
|
||||||
&& rm "/tmp/bazel-${BAZEL_VERSION}-dist.zip" \
|
|
||||||
&& ( \
|
|
||||||
cd /tmp/bazel \
|
|
||||||
&& unset JAVA_VERSION \
|
|
||||||
&& bash ./compile.sh compile \
|
|
||||||
&& mv output/bazel /usr/bin/bazel \
|
|
||||||
) \
|
|
||||||
&& apk del $buildDeps \
|
|
||||||
&& rm -rf /tmp/bazel*
|
|
||||||
|
|
||||||
|
# install bazel
|
||||||
|
RUN buildDeps=' \
|
||||||
|
curl \
|
||||||
|
' \
|
||||||
|
&& 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
|
||||||
|
|
||||||
# install gitiles
|
# install gitiles
|
||||||
RUN buildDeps=' \
|
RUN buildDeps=' \
|
||||||
|
curl \
|
||||||
git \
|
git \
|
||||||
|
zip \
|
||||||
' \
|
' \
|
||||||
set -x \
|
set -x \
|
||||||
&& apk --no-cache add $buildDeps \
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
&& git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd /usr/src/gitiles \
|
cd /usr/src/gitiles \
|
||||||
&& git submodule update --init \
|
&& git submodule update --init \
|
||||||
&& bazel build //... \
|
&& bazel build //... \
|
||||||
) \
|
) \
|
||||||
&& apk del $buildDeps
|
&& apt-get purge -y --auto-remove $buildDeps
|
||||||
|
|
||||||
COPY start.sh /usr/bin/start.sh
|
COPY start.sh /usr/bin/start.sh
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ ROOT=/usr/src/gitiles
|
||||||
PROPERTIES=
|
PROPERTIES=
|
||||||
|
|
||||||
if [ "x$1" != "x" ]; then
|
if [ "x$1" != "x" ]; then
|
||||||
PROPERTIES="-Dcom.google.gitiles.configPath=$1"
|
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=$1"
|
||||||
else
|
else
|
||||||
PROPERTIES="-Dcom.google.gitiles.configPath=/gitfiles.config"
|
PROPERTIES="--jvm_flag=-Dcom.google.gitiles.configPath=/gitfiles.config"
|
||||||
cat > /gitfiles.config <<-EOF
|
cat > /gitfiles.config <<-EOF
|
||||||
[gitiles]
|
[gitiles]
|
||||||
# Repositories placed here
|
# Repositories placed here
|
||||||
|
@ -25,6 +25,6 @@ else
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROPERTIES="$PROPERTIES -Dcom.google.gitiles.sourcePath=$ROOT"
|
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
||||||
|
|
||||||
exec java $PROPERTIES -jar "$ROOT/buck-out/gen/gitiles-dev/dev.jar"
|
exec "${ROOT}/bazel-bin/gitiles-dev/dev" $PROPERTIES
|
||||||
|
|
|
@ -56,7 +56,6 @@ hashicorp/consul
|
||||||
CouchPotato/CouchPotatoServer
|
CouchPotato/CouchPotatoServer
|
||||||
pooler/cpuminer
|
pooler/cpuminer
|
||||||
curl/curl
|
curl/curl
|
||||||
bazelbuild/bazel
|
|
||||||
opendnssec/SoftHSMv2
|
opendnssec/SoftHSMv2
|
||||||
irssi/irssi
|
irssi/irssi
|
||||||
zyedidia/micro
|
zyedidia/micro
|
||||||
|
|
Loading…
Reference in New Issue
Block a user