mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
gitiles
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
d5b8008402
commit
4471db2045
|
@ -1,35 +1,56 @@
|
|||
FROM java:8-alpine
|
||||
MAINTAINER Jessie Frazelle <jess@linux.com>
|
||||
|
||||
# install buck
|
||||
# install bazel
|
||||
ENV BAZEL_VERSION 0.4.4
|
||||
RUN buildDeps=' \
|
||||
apache-ant \
|
||||
bash \
|
||||
build-base \
|
||||
curl \
|
||||
git \
|
||||
perl \
|
||||
python \
|
||||
gnupg \
|
||||
linux-headers \
|
||||
zip \
|
||||
' \
|
||||
set -x \
|
||||
&& apk --no-cache add $buildDeps \
|
||||
--repository https://dl-3.alpinelinux.org/alpine/edge/community/ \
|
||||
&& git clone --depth 1 https://github.com/facebook/buck.git /buck \
|
||||
&& 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 /buck \
|
||||
&& ant \
|
||||
&& ln -snfv ${PWD}/bin/buck /usr/bin/buck \
|
||||
cd /tmp \
|
||||
&& cat "bazel-${BAZEL_VERSION}-dist.zip.sha256" | sha256sum -c - \
|
||||
) \
|
||||
&& git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /gitiles \
|
||||
&& 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 /gitiles \
|
||||
&& touch .nobuckcheck \
|
||||
&& git submodule update --init \
|
||||
&& buck build gitiles-dev:dev \
|
||||
cd /tmp/bazel \
|
||||
&& unset JAVA_VERSION \
|
||||
&& bash ./compile.sh compile \
|
||||
&& mv output/bazel /usr/bin/bazel \
|
||||
) \
|
||||
&& apk del $buildDeps \
|
||||
&& rm -rf /buck
|
||||
&& rm -rf /tmp/bazel*
|
||||
|
||||
COPY start.sh /start.sh
|
||||
|
||||
ENTRYPOINT [ "/start.sh" ]
|
||||
# install gitiles
|
||||
RUN buildDeps=' \
|
||||
git \
|
||||
' \
|
||||
set -x \
|
||||
&& apk --no-cache add $buildDeps \
|
||||
&& git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
||||
&& ( \
|
||||
cd /usr/src/gitiles \
|
||||
&& git submodule update --init \
|
||||
&& bazel build //... \
|
||||
) \
|
||||
&& apk del $buildDeps
|
||||
|
||||
COPY start.sh /usr/bin/start.sh
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/start.sh" ]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
ROOT=/gitiles
|
||||
ROOT=/usr/src/gitiles
|
||||
PROPERTIES=
|
||||
|
||||
if [ "x$1" != "x" ]; then
|
||||
|
|
|
@ -35,6 +35,8 @@ get_latest() {
|
|||
dir="couchpotato"
|
||||
elif [[ "$dir" == "SoftHSMv2" ]]; then
|
||||
dir="golang-softhsm2"
|
||||
elif [[ "$dir" == "bazel" ]]; then
|
||||
dir="gitiles"
|
||||
fi
|
||||
|
||||
local current=$(cat "${dir}/Dockerfile" | grep -m 1 VERSION | awk '{print $(NF)}')
|
||||
|
@ -54,6 +56,7 @@ hashicorp/consul
|
|||
CouchPotato/CouchPotatoServer
|
||||
pooler/cpuminer
|
||||
curl/curl
|
||||
bazelbuild/bazel
|
||||
opendnssec/SoftHSMv2
|
||||
irssi/irssi
|
||||
zyedidia/micro
|
||||
|
|
Loading…
Reference in New Issue
Block a user