<commit_before># Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This docker image is for testing of Shipshape. It provides a ready-made
# environment in which Shipshape can be built and tested.
#
# Shipshape has the following build and test dependencies:
#
#  - Docker - Needed by Shipshape
#  - JDK version 8 - Needed by Bazel
#  - Bazel - Needed by Shipshape for building/testing
#  - Bison
#  - Clang
#  - Flex
#  - Go
#  - Android lint - Needed by Shipshape for testing
#
# Dependencies are listed at https://github.com/google/shipshape.
#

# -- Docker --
# This is a dind container and provides us with Docker
FROM b.gcr.io/dev_containers/cloud-dev-java:prod

# Make sure image is up to date
RUN apt-get update && apt-get upgrade -y  && \
   apt-get install -y  -qq --no-install-recommends

# -- JDK 8 ---
RUN apt-get install -y -qq --no-install-recommends openjdk-8-jdk openjdk-8-source

# -- Go --
RUN curl -L -s http://golang.org/dl/go1.5.1.linux-amd64.tar.gz | tar -zx -C /usr/local
ENV PATH $PATH:/usr/local/go/bin
ENV GOPATH /go
ENV GOROOT /usr/local/go

# -- Bison, Clang, and Flex --
RUN apt-get install -y -qq --no-install-recommends bison clang flex

# -- Shipshape --
RUN git clone --depth 1 https://github.com/google/shipshape.git

# -- Bazel --
RUN apt-get install -y -qq --no-install-recommends pkg-config zip g++ zlib1g-dev unzip
RUN wget https://github.com/bazelbuild/bazel/releases/download/0.1.0/bazel-0.1.0-installer-linux-x86_64.sh
RUN chmod u+x bazel-0.1.0-installer-linux-x86_64.sh
RUN ./bazel-0.1.0-installer-linux-x86_64.sh

# -- Android lint --
RUN wget http://dl.google.com/android/android-sdk_r23-linux.tgz
RUN tar xvf android-sdk_r23-linux.tgz
ENV PATH /android-sdk-linux/tools:$PATH
RUN echo "y" | android update sdk --no-ui --filter platform-tool
RUN echo "y" | android update sdk --no-ui --filter tools
# This is a workaround for a failure in the "android update" command:
# https://github.com/google/shipshape/issues/27
# The update fails to clobber the /tools directory for some reason, so
# we have to do the clobbering for it.
RUN rm -rf /android-sdk-linux/tools
RUN unzip /android-sdk-linux/temp/tools_*-linux.zip -d /android-sdk-linux
ENV PATH /android-sdk-linux/platform-tools:$PATH

# Make sure Bazel is setup (and android lint)<commit_msg>Attempt to make wget quieter.<commit_after># Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This docker image is for testing of Shipshape. It provides a ready-made
# environment in which Shipshape can be built and tested.
#
# Shipshape has the following build and test dependencies:
#
#  - Docker - Needed by Shipshape
#  - JDK version 8 - Needed by Bazel
#  - Bazel - Needed by Shipshape for building/testing
#  - Bison
#  - Clang
#  - Flex
#  - Go
#  - Android lint - Needed by Shipshape for testing
#
# Dependencies are listed at https://github.com/google/shipshape.
#

# -- Docker --
# This is a dind container and provides us with Docker
FROM b.gcr.io/dev_containers/cloud-dev-java:prod

# Make sure image is up to date
RUN apt-get update && apt-get upgrade -y  && \
   apt-get install -y  -qq --no-install-recommends

# -- JDK 8 ---
RUN apt-get install -y -qq --no-install-recommends openjdk-8-jdk openjdk-8-source

# -- Go --
RUN curl -L -s http://golang.org/dl/go1.5.1.linux-amd64.tar.gz | tar -zx -C /usr/local
ENV PATH $PATH:/usr/local/go/bin
ENV GOPATH /go
ENV GOROOT /usr/local/go

# -- Bison, Clang, and Flex --
RUN apt-get install -y -qq --no-install-recommends bison clang flex

# -- Shipshape --
RUN git clone --depth 1 https://github.com/google/shipshape.git

# -- Bazel --
RUN apt-get install -y -qq --no-install-recommends pkg-config zip g++ zlib1g-dev unzip
RUN wget -nv https://github.com/bazelbuild/bazel/releases/download/0.1.0/bazel-0.1.0-installer-linux-x86_64.sh
RUN chmod u+x bazel-0.1.0-installer-linux-x86_64.sh
RUN ./bazel-0.1.0-installer-linux-x86_64.sh

# -- Android lint --
RUN wget -nv http://dl.google.com/android/android-sdk_r23-linux.tgz
RUN tar xvf android-sdk_r23-linux.tgz
ENV PATH /android-sdk-linux/tools:$PATH
RUN echo "y" | android update sdk --no-ui --filter platform-tool
RUN echo "y" | android update sdk --no-ui --filter tools
# This is a workaround for a failure in the "android update" command:
# https://github.com/google/shipshape/issues/27
# The update fails to clobber the /tools directory for some reason, so
# we have to do the clobbering for it.
RUN rm -rf /android-sdk-linux/tools
RUN unzip /android-sdk-linux/temp/tools_*-linux.zip -d /android-sdk-linux
ENV PATH /android-sdk-linux/platform-tools:$PATH

# Make sure Bazel is setup (and android lint)
{'fraction_non_alphanumeric': 0.11585794655414909, 'fraction_numerical': 0.017229254571026722, 'mean_word_length': 3.264617691154423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '647036', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1883, 'n_words': 667}