github.com/abayer/test-infra@v0.0.5/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 # TODO(bentheelder): consider replacing all maintainers with a test-infra-maintainers alias of some sort 18 LABEL maintainer="bentheelder@google.com" 19 20 # add env we can debug with the image name:tag 21 ARG IMAGE_ARG 22 ENV IMAGE=${IMAGE_ARG} 23 24 ARG BAZEL_VERSION 25 26 RUN apt-get update && apt-get install -y --no-install-recommends \ 27 build-essential \ 28 ca-certificates \ 29 file \ 30 git \ 31 openssh-client \ 32 python \ 33 python-pip \ 34 rpm \ 35 unzip \ 36 wget \ 37 zip \ 38 zlib1g-dev \ 39 && apt-get clean \ 40 && python -m pip install --upgrade pip setuptools wheel 41 42 RUN wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz && \ 43 tar xf google-cloud-sdk.tar.gz && \ 44 rm google-cloud-sdk.tar.gz && \ 45 ./google-cloud-sdk/install.sh 46 ENV PATH "/google-cloud-sdk/bin:${PATH}" 47 48 ENV NODE_VERSION 6.10.0 49 RUN wget -q https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz && \ 50 tar xf node-v${NODE_VERSION}-linux-x64.tar.xz --strip-components=1 -C /usr && \ 51 rm node-v${NODE_VERSION}-linux-x64.tar.xz && \ 52 npm install -g mocha 53 54 RUN INSTALLER="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh"; \ 55 DOWNLOAD_URL="https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/${INSTALLER}"; \ 56 wget -q "${DOWNLOAD_URL}" && \ 57 chmod +x "${INSTALLER}" && "./${INSTALLER}" && rm "${INSTALLER}" 58 59 WORKDIR /workspace 60 COPY runner /usr/local/bin/ 61 ENTRYPOINT ["/bin/bash", "/usr/local/bin/runner"]