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