github.com/abayer/test-infra@v0.0.5/dind/base/Dockerfile (about)

     1  # Copyright 2017 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  FROM k8s.gcr.io/debian-base-amd64:0.3
    16  
    17  ENV container docker
    18  
    19  ARG DEBIAN_FRONTEND=noninteractive
    20  RUN clean-install apt-utils \
    21      apt-transport-https \
    22      bash \
    23      ca-certificates \
    24      curl \
    25      ethtool \
    26      gnupg2 \
    27      iptables \
    28      iproute2 \
    29      jq \
    30      kmod \
    31      lsb-core \
    32      less \
    33      lxc \
    34      mount ebtables \
    35      procps \
    36      socat \
    37      software-properties-common \
    38      util-linux \
    39      vim \
    40      systemd \
    41      systemd-sysv
    42  
    43  
    44  # Install docker.
    45  RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && apt-key fingerprint 0EBFCD88 && add-apt-repository \
    46      "deb [arch=amd64] https://download.docker.com/linux/debian \
    47      $(lsb_release -cs) \
    48      stable"
    49  RUN clean-install docker-ce=17.03.2~ce-0~debian-stretch
    50  
    51  # Install our startup configuration for docker.
    52  COPY daemon.json /etc/docker/daemon.json
    53  COPY docker.service /lib/systemd/system/docker.service
    54  
    55  # Install the magic wrapper.
    56  COPY dind /bin/dind
    57  COPY dockerd-entrypoint.sh /bin/dockerd-entrypoint.sh
    58  
    59  # Remove unwanted systemd services.
    60  RUN for i in /lib/systemd/system/sysinit.target.wants/*; do [ "${i##*/}" = "systemd-tmpfiles-setup.service" ] || rm -f "$i"; done; \
    61    rm -f /lib/systemd/system/multi-user.target.wants/*;\
    62    rm -f /etc/systemd/system/*.wants/*;\
    63    rm -f /lib/systemd/system/local-fs.target.wants/*; \
    64    rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
    65    rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
    66    rm -f /lib/systemd/system/basic.target.wants/*;\
    67    rm -f /lib/systemd/system/anaconda.target.wants/*;
    68  
    69  # TODO(Q-Lee): SIGRTMIN+3 is the shutdown signal for systemd. Investigate why "STOPSIGNAL SIGRTMIN+3" breaks.
    70  
    71  # Define additional metadata for our image.
    72  VOLUME /var/lib/docker
    73  VOLUME /var/lib/kubelet
    74  
    75  ENTRYPOINT ["/sbin/init"]