github.com/shashidharatd/test-infra@v0.0.0-20171006011030-71304e1ca560/jenkins/test-image/Dockerfile-1.5 (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 # This file creates a build environment for building and running kubernetes 16 # unit and integration tests 17 18 FROM golang:1.7.4 19 LABEL authors="Sen Lu <senlu@google.com>" 20 21 # Setup workspace and symlink to gopath 22 WORKDIR /workspace 23 RUN mkdir -p /go/src/k8s.io/kubernetes /workspace \ 24 && ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes 25 ENV WORKSPACE=/workspace \ 26 TERM=xterm 27 28 # Install linux packages 29 # bc is needed by shell2junit 30 # dnsutils is needed by federation cluster scripts. 31 # file is used when uploading test artifacts to GCS. 32 # jq is used by hack/verify-godep-licenses.sh 33 # python-pip is needed to install the AWS cli. 34 # netcat is used by integration test scripts. 35 RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \ 36 bc \ 37 dnsutils \ 38 file \ 39 jq \ 40 python-pip \ 41 netcat-openbsd \ 42 rsync \ 43 --no-install-recommends \ 44 && rm -rf /var/lib/apt/lists/* 45 46 # Install docker 47 # Note: 1.11+ changes the tarball format 48 RUN curl -L "https://get.docker.com/builds/Linux/x86_64/docker-1.9.1.tgz" \ 49 | tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker 50 51 # Get dependency (tools) and golint 52 ENV GO_TOOLS_COMMIT b66e054640c8249b6bc92cebffaec2bcf8b5efd0 53 ENV GO_LINT_COMMIT 3390df4df2787994aea98de825b964ac7944b817 54 RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ 55 && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ 56 && git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ 57 && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ 58 && go install -v github.com/golang/lint/golint \ 59 && rm -rf /go/src/github.com/golang/{tools,lint}