Created
March 21, 2016 00:09
-
-
Save smparkes/2840ef16bcf18e78961e to your computer and use it in GitHub Desktop.
docker build of protobuf with bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
RUN \ | |
apt-get update && \ | |
apt-get install --no-install-recommends -y openjdk-8-jre-headless && \ | |
apt-get install --no-install-recommends -y gcc-4.9 && \ | |
apt-get install --no-install-recommends -y g++-4.9 && \ | |
apt-get install --no-install-recommends -y wget && \ | |
apt-get install --no-install-recommends -y unzip && \ | |
apt-get install --no-install-recommends -y openjdk-8-jdk && \ | |
apt-get install --no-install-recommends -y git && \ | |
apt-get install --no-install-recommends -y rsync && \ | |
apt-get install --no-install-recommends -y less && \ | |
apt-get clean && \ | |
wget 'https://github.com/bazelbuild/bazel/releases/download/0.2.0/bazel-0.2.0-installer-linux-x86_64.sh' && \ | |
bash bazel-0.2.0-installer-linux-x86_64.sh && \ | |
ln -s /usr/bin/gcc-4.9 /usr/bin/gcc && \ | |
ln -s /usr/bin/g++-4.9 /usr/bin/g++ | |
RUN \ | |
/bin/bash -c " \ | |
export VERBOSE_BLAZE_CLIENT=1 && \ | |
export HOSTNAME=unknown && \ | |
cat /etc/hosts > hosts.tmp && \ | |
sed -e s/`hostname`/ci/ < hosts.tmp > /etc/hosts && \ | |
set -e && \ | |
set -o pipefail && \ | |
git clone https://github.com/google/protobuf.git && \ | |
cd protobuf && \ | |
bazel --batch build --genrule_strategy=standalone --spawn_strategy=standalone //:protobuf_lite | cat && \ | |
bazel --batch build --genrule_strategy=standalone --spawn_strategy=standalone --check_up_to_date //:protobuf_lite | cat && \ | |
true \ | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment