diff options
author | murgatroid99 <mlumish@google.com> | 2017-01-04 15:43:02 -0800 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2017-01-04 15:43:02 -0800 |
commit | c34cac28912595814fb35225957eed0ddfd5d610 (patch) | |
tree | 5b89408b87d756791e6c5dee2247bae3609565cc /tools/dockerfile | |
parent | 804c9e90fc4e7d11294fec69801ff7bc99134d3c (diff) | |
parent | 360f5d2abf8cb0f92aeeb3a1b201d2eb3bd13374 (diff) |
Merge branch 'master' into node_electron_build
Diffstat (limited to 'tools/dockerfile')
6 files changed, 56 insertions, 14 deletions
diff --git a/tools/dockerfile/grpc_artifact_protoc/Dockerfile b/tools/dockerfile/grpc_artifact_protoc/Dockerfile index 1bbc6e021b..2904a8fa51 100644 --- a/tools/dockerfile/grpc_artifact_protoc/Dockerfile +++ b/tools/dockerfile/grpc_artifact_protoc/Dockerfile @@ -59,5 +59,11 @@ RUN yum install -y devtoolset-1.1 \ devtoolset-1.1-libstdc++-devel \ devtoolset-1.1-libstdc++-devel.i686 || true +# Update Git to version >1.7 to allow cloning submodules with --reference arg. +RUN yum remove -y git +RUN yum install -y epel-release +RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm +RUN yum install -y git2u + # Start in devtoolset environment that uses GCC 4.7 CMD ["scl", "enable", "devtoolset-1.1", "bash"] diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile index 1d4e8e1a4a..69e624aa41 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile @@ -34,6 +34,19 @@ FROM quay.io/pypa/manylinux1_x86_64 # Update the package manager RUN yum update -y +############################################################# +# Update Git to allow cloning submodules with --reference arg +RUN yum remove -y git +RUN yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc +RUN cd /usr/src && \ + wget https://kernel.org/pub/software/scm/git/git-2.0.5.tar.gz && \ + tar xzf git-2.0.5.tar.gz +RUN cd /usr/src/git-2.0.5 && \ + make prefix=/usr/local/git all && \ + make prefix=/usr/local/git install +ENV PATH /usr/local/git/bin:$PATH +RUN source /etc/bashrc + ################################### # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile index 810499695e..9af80078ed 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile @@ -34,6 +34,19 @@ FROM quay.io/pypa/manylinux1_i686 # Update the package manager RUN yum update -y +############################################################# +# Update Git to allow cloning submodules with --reference arg +RUN yum remove -y git +RUN yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc +RUN cd /usr/src && \ + wget https://kernel.org/pub/software/scm/git/git-2.0.5.tar.gz && \ + tar xzf git-2.0.5.tar.gz +RUN cd /usr/src/git-2.0.5 && \ + make prefix=/usr/local/git all && \ + make prefix=/usr/local/git install +ENV PATH /usr/local/git/bin:$PATH +RUN source /etc/bashrc + ################################### # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython diff --git a/tools/dockerfile/grpc_clang_format/Dockerfile b/tools/dockerfile/grpc_clang_format/Dockerfile index ab58017a02..85f5e4db74 100644 --- a/tools/dockerfile/grpc_clang_format/Dockerfile +++ b/tools/dockerfile/grpc_clang_format/Dockerfile @@ -27,13 +27,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM ubuntu:wily -RUN apt-get update -RUN apt-get -y install wget +FROM ubuntu:15.10 + +RUN apt-get update && apt-get -y install wget RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key| apt-key add - -RUN apt-get update -RUN apt-get -y install clang-format-3.8 +RUN apt-get update && apt-get -y install clang-format-3.8 + ADD clang_format_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_format_code.sh'"] diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 462c65ab5e..c6e4aabfe6 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -44,7 +44,7 @@ for dir in $DIRS do for glob in $GLOB do - files="$files `find /local-code/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c -and -not -name *.pb.cc`" + files="$files `find ${CLANG_FORMAT_ROOT}/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c -and -not -name *.pb.cc`" done done @@ -54,7 +54,7 @@ if [ -n "$CHANGED_FILES" ]; then files=$(comm -12 <(echo $files | tr ' ' '\n' | sort -u) <(echo $CHANGED_FILES | tr ' ' '\n' | sort -u)) fi -if [ "x$TEST" = "x" ] +if [ "$TEST" == "" ] then echo $files | xargs $CLANG_FORMAT -i else diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 6b19ac845b..811384fda1 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,17 +97,27 @@ RUN apt-get install -y openjdk-8-jdk # ./compile.sh without a local protoc dependency # TODO(mattkwong): install dependencies to support latest Bazel version if newer # version is needed -RUN git clone https://github.com/bazelbuild/bazel.git /bazel && cd /bazel && git checkout tags/0.4.1 && ./compile.sh +RUN git clone https://github.com/bazelbuild/bazel.git /bazel && \ + cd /bazel && git checkout tags/0.4.1 && ./compile.sh RUN ln -s /bazel/output/bazel /bin/ -#=================== -# Docker "inception" -# Note this is quite the ugly hack. -# This makes sure that the docker binary we inject has its dependencies. -RUN curl https://get.docker.com/ | sh -RUN apt-get remove --purge -y docker-engine +RUN apt-get update && apt-get -y install wget +RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list +RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list +RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key| apt-key add - +RUN apt-get update && apt-get -y install clang-format-3.8 + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + RUN mkdir /var/local/jenkins + # Define the default command. CMD ["bash"] |