github.com/shashidharatd/test-infra@v0.0.0-20171006011030-71304e1ca560/images/bazelbuild/Dockerfile (about)

     1  # Copyright 2016 The Kubernetes Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  # Includes git, gcloud, and bazel.
    16  FROM ubuntu:16.04
    17  MAINTAINER spxtr@google.com
    18  
    19  ARG BAZEL_VERSION
    20  
    21  RUN apt-get update && apt-get install -y --no-install-recommends \
    22      build-essential \
    23      ca-certificates \
    24      file \
    25      git \
    26      python \
    27      python-pip \
    28      unzip \
    29      wget \
    30      zip \
    31      zlib1g-dev \
    32      && apt-get clean
    33  
    34  RUN wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz && \
    35      tar xf google-cloud-sdk.tar.gz && \
    36      rm google-cloud-sdk.tar.gz && \
    37      ./google-cloud-sdk/install.sh
    38  ENV PATH "/google-cloud-sdk/bin:${PATH}"
    39  
    40  ENV NODE_VERSION 6.10.0
    41  RUN wget -q https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz && \
    42      tar xf node-v${NODE_VERSION}-linux-x64.tar.xz --strip-components=1 -C /usr && \
    43      rm node-v${NODE_VERSION}-linux-x64.tar.xz && \
    44      npm install -g mocha
    45  
    46  RUN INSTALLER="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh"; \
    47      DOWNLOAD_URL="https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${INSTALLER}"; \
    48      wget -q "${DOWNLOAD_URL}" && \
    49      chmod +x "${INSTALLER}" && "./${INSTALLER}" && rm "${INSTALLER}"
    50  
    51  WORKDIR /workspace
    52  COPY runner coalesce.py /usr/local/bin/
    53  ENTRYPOINT ["/bin/bash", "/usr/local/bin/runner"]