...

Text file src/k8s.io/kubernetes/build/build-image/Dockerfile

Documentation: k8s.io/kubernetes/build/build-image

     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 standard build environment for building Kubernetes
    16ARG KUBE_CROSS_IMAGE
    17ARG KUBE_CROSS_VERSION
    18
    19FROM ${KUBE_CROSS_IMAGE}:${KUBE_CROSS_VERSION}
    20
    21# Mark this as a kube-build container
    22RUN touch /kube-build-image
    23
    24# To run as non-root we sometimes need to rebuild go stdlib packages.
    25RUN chmod -R a+rwx /usr/local/go/pkg
    26
    27# For running integration tests /var/run/kubernetes is required
    28# and should be writable by user
    29RUN mkdir /var/run/kubernetes && chmod a+rwx /var/run/kubernetes
    30
    31# The kubernetes source is expected to be mounted here.  This will be the base
    32# of operations.
    33ENV HOME=/go/src/k8s.io/kubernetes
    34WORKDIR ${HOME}
    35
    36# Make output from the dockerized build go someplace else
    37ENV KUBE_OUTPUT_SUBPATH=_output/dockerized
    38
    39# Pick up version stuff here as we don't copy our .git over.
    40ENV KUBE_GIT_VERSION_FILE=${HOME}/.dockerized-kube-version-defs
    41
    42# Add system-wide git user information
    43RUN git config --system user.email "nobody@k8s.io" \
    44  && git config --system user.name "kube-build-image"
    45
    46# Fix permissions on gopath
    47RUN chmod -R a+rwx $GOPATH
    48
    49# Make log messages use the right timezone
    50ADD localtime /etc/localtime
    51RUN chmod a+r /etc/localtime
    52
    53# Set up rsyncd
    54ADD rsyncd.password /
    55RUN chmod a+r /rsyncd.password
    56ADD rsyncd.sh /
    57RUN chmod a+rx /rsyncd.sh

View as plain text