kythe.io@v0.0.68-0.20240422202219-7225dbc01741/tools/docker/Dockerfile (about)

     1  # Copyright 2015 The Kythe Authors. All rights reserved.
     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  # docker build -t gcr.io/kythe-repo/kythe-builder .
    16  FROM ubuntu:xenial
    17  
    18  ENV DEBIAN_FRONTEND noninteractive
    19  
    20  RUN apt-get update && \
    21      apt-get upgrade -y && \
    22      apt-get install -y --no-install-recommends curl ca-certificates && \
    23      apt-get clean
    24  
    25  RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
    26  RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
    27  
    28  RUN apt-get update && \
    29      apt-get install -y --no-install-recommends \
    30        git pkg-config zip unzip rsync patch zsh wget net-tools less parallel locales make \
    31        g++ gcc openjdk-8-jdk openjdk-8-source clang-3.6 flex asciidoc source-highlight graphviz \
    32        zlib1g-dev libarchive-dev uuid-dev bazel \
    33        ca-certificates-java libsasl2-dev && \
    34      apt-get clean
    35  
    36  RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
    37  ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
    38  ENV CC=/usr/bin/clang-3.6
    39  
    40  # Bison
    41  RUN wget http://archive.kernel.org/debian-archive/debian/pool/main/b/bison/bison_2.3.dfsg-5_amd64.deb -O /tmp/bison_2.3.deb && \
    42      dpkg -i /tmp/bison_2.3.deb && \
    43      rm -f /tmp/bison_2.3.deb
    44  
    45  # Go
    46  RUN wget https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz -O /tmp/go.tar.gz && \
    47      tar xzf /tmp/go.tar.gz -C /usr/local/ && \
    48      rm -f /tmp/go.tar.gz
    49  ENV PATH=/usr/local/go/bin:$PATH