github.com/abayer/test-infra@v0.0.5/mungegithub/Dockerfile-publisher (about)

     1  # Copyright 2017 Google Inc. 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  FROM google/debian:jessie
    16  MAINTAINER Chao Xu <xuchao@google.com>
    17  RUN apt-get update \
    18   && apt-get install -y -qq git=1:2.1.4-2.1+deb8u2 \
    19   && apt-get install -y -qq mercurial=3.1.2-2+deb8u3 \
    20   && apt-get install -y -qq ca-certificates wget jq vim tmux \
    21   && wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz \
    22   && tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz \
    23   && rm -rf /var/lib/apt/lists/*
    24  ENV PATH="/usr/local/go/bin:${PATH}"
    25  
    26  ENV GOPATH="/go-workspace"
    27  ENV PATH="${GOPATH}/bin:${PATH}"
    28  RUN go get github.com/tools/godep \
    29   && cd /go-workspace/src/github.com/tools/godep \
    30   && git checkout tags/v79 \
    31   && go install ./... 
    32  
    33  WORKDIR "/"
    34  
    35  ADD mungers/publish_scripts/initialize_repos.sh /publish_scripts/initialize_repos.sh
    36  # this is taking long time, so run it before copying code to avoid re-run when rebuild image
    37  RUN /publish_scripts/initialize_repos.sh
    38  
    39  ADD mungegithub /mungegithub
    40  ADD mungers/publish_scripts/ /publish_scripts
    41  CMD ["/mungegithub", "--dry-run", "--token-file=/token"]