Files
my-rook-config/images/ceph/Dockerfile
T
Blaine Gardner fab71d1f37 build: remove iproute build dependency on centos repo
Multus requires that the 'ip' tool be installed in the Rook image.
Today, it is present in the upstream Ceph base image that is used, but
that is expected to change in the future. The Ceph project intends to
switch to CentOS 9 minimal images, and the 'ip' tool will likely be
removed from the base image at that point.

However, Rook CI has occasionally had issues with the current 'dnf
install' command when CentOS repos go down, or when there is otherwise
some problem. Because the package is already installed today, there is
no need to hamstring Rook builds when CentOS is having problems. But we
do want to make sure that Rook builds don't silently succeed in the
eventual future when 'ip' tool is removed from the Ceph image.

For now, replace the 'dnf install' with a check to verify that 'ip' tool
is installed, and add a shorter form of this note as a comment above it
to help Rook maintainers know how to resolve future 'ip' tool removal.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit c4e99c1462)
2024-06-03 21:17:00 +00:00

43 lines
1.8 KiB
Docker

# Copyright 2016 The Rook Authors. 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.
# see Makefile for the BASEIMAGE definition
FROM BASEIMAGE
# env vars for s5cmd
ARG S5CMD_VERSION
ARG S5CMD_ARCH
# 'ip' tool must be installed for Multus. It's present in the base image today, but it will likely
# be removed in the future. Doing a 'dnf install' sometimes breaks CI when centos repos go down or
# have other package build errors. In order to make sure Rook CI catches the eventual removal and
# also limit Rook CI breakage due to centos breakage, simply check that 'ip' is present.
# Eventually: dnf install -y --repo baseos --setopt=install_weak_deps=False iproute && dnf clean all
RUN which ip
# Install the s5cmd package to interact with s3 gateway
RUN curl --fail -sSL -o /s5cmd.tar.gz https://github.com/peak/s5cmd/releases/download/v${S5CMD_VERSION}/s5cmd_${S5CMD_VERSION}_${S5CMD_ARCH}.tar.gz && \
mkdir /s5cmd && \
tar xf /s5cmd.tar.gz -C /s5cmd && \
install /s5cmd/s5cmd /usr/local/bin/s5cmd && \
rm -rf /s5cmd.tar.gz /s5cmd
COPY rook toolbox.sh set-ceph-debug-level /usr/local/bin/
COPY ceph-monitoring /etc/ceph-monitoring
COPY rook-external /etc/rook-external/
RUN useradd rook -u 2016 # 2016 is the UID of the rook user and also the year of the first commit in the project
USER 2016
ENTRYPOINT ["/usr/local/bin/rook"]
CMD [""]