# Copyright 2020 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. FROM quay.io/centos/centos:stream9 LABEL maintainer="OpenStack Kubernetes Operator team" LABEL tcib_managed=true ENV LANG="en_US.UTF-8" ENV container="oci" USER root RUN if [ -f "/etc/yum.repos.d/ubi.repo" ]; then rm -f /etc/yum.repos.d/ubi.repo && dnf clean all && rm -rf /var/cache/dnf; fi RUN dnf install -y crudini && crudini --del /etc/dnf/dnf.conf main override_install_langs && crudini --set /etc/dnf/dnf.conf main clean_requirements_on_remove True && crudini --set /etc/dnf/dnf.conf main exactarch 1 && crudini --set /etc/dnf/dnf.conf main gpgcheck 1 && crudini --set /etc/dnf/dnf.conf main install_weak_deps False && if [ 'centos' == 'centos' ];then crudini --set /etc/dnf/dnf.conf main best False; fi && crudini --set /etc/dnf/dnf.conf main installonly_limit 0 && crudini --set /etc/dnf/dnf.conf main keepcache 0 && crudini --set /etc/dnf/dnf.conf main obsoletes 1 && crudini --set /etc/dnf/dnf.conf main plugins 1 && crudini --set /etc/dnf/dnf.conf main skip_missing_names_on_install False && crudini --set /etc/dnf/dnf.conf main tsflags nodocs RUN dnf install -y ca-certificates dumb-init glibc-langpack-en procps-ng python3 sudo util-linux-user which python-tcib-containers RUN cp /usr/share/tcib/container-images/kolla/base/uid_gid_manage.sh /usr/local/bin/uid_gid_manage RUN chmod 755 /usr/local/bin/uid_gid_manage RUN bash /usr/local/bin/uid_gid_manage kolla hugetlbfs libvirt qemu RUN touch /usr/local/bin/kolla_extend_start && chmod 755 /usr/local/bin/kolla_extend_start RUN cp /usr/share/tcib/container-images/kolla/base/set_configs.py /usr/local/bin/kolla_set_configs RUN chmod 755 /usr/local/bin/kolla_set_configs RUN cp /usr/share/tcib/container-images/kolla/base/start.sh /usr/local/bin/kolla_start RUN chmod 755 /usr/local/bin/kolla_start RUN cp /usr/share/tcib/container-images/kolla/base/httpd_setup.sh /usr/local/bin/kolla_httpd_setup RUN chmod 755 /usr/local/bin/kolla_httpd_setup RUN cp /usr/share/tcib/container-images/kolla/base/copy_cacerts.sh /usr/local/bin/kolla_copy_cacerts RUN chmod 755 /usr/local/bin/kolla_copy_cacerts RUN cp /usr/share/tcib/container-images/kolla/base/sudoers /etc/sudoers RUN chmod 440 /etc/sudoers RUN sed -ri '/^(passwd:|group:)/ s/systemd//g' /etc/nsswitch.conf RUN dnf -y reinstall which && rpm -e --nodeps tzdata && dnf -y install tzdata RUN mkdir -p /openstack RUN if [ 'centos' == 'centos' ];then if [ -n "$(rpm -qa redhat-release)" ];then rpm -e --nodeps redhat-release; fi ; dnf -y install centos-stream-release; fi RUN dnf update --excludepkgs redhat-release -y && dnf clean all && rm -rf /var/cache/dnf STOPSIGNAL SIGTERM ENTRYPOINT ["dumb-init", "--single-child", "--"] CMD ["kolla_start"]