54bd0dff3279f10db516f350b9b092f97a13f9eb
[ta/caas-kubernetes.git] / docker-build / hyperkube / Dockerfile
1 # Copyright 2019 Nokia
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 centos:7.6.1810
16 MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
17
18 ARG ceph_version
19
20 # These packages explicitly needed to install specified ceph-common version
21 ARG ceph_packages="ceph-common-$ceph_version librados2-$ceph_version libradosstriper1-$ceph_version"
22
23 COPY kube-apiserver /kube-apiserver
24 COPY kube-controller-manager /kube-controller-manager
25 COPY kube-proxy /kube-proxy
26 COPY kube-scheduler /kube-scheduler
27
28 RUN useradd -u 144 -M -s /sbin/nologin kube \
29 &&  yum install -y https://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-1.el7.noarch.rpm \
30 &&  yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
31 &&  yum install -y --setopt=skip_missing_names_on_install=False \
32       ${ceph_packages} \
33       conntrack-tools \
34 \
35 # Install kubernetes
36 &&  chmod a+x /kube-apiserver \
37 &&  chmod a+x /kube-controller-manager \
38 &&  chmod a+x /kube-proxy \
39 &&  chmod a+x /kube-scheduler \
40 # Clean up
41 &&  yum erase -y ceph-release \
42 &&  yum autoremove -y \
43 &&  yum clean all -y \