Files
my-rook-config/images/ceph/Dockerfile
T
Blaine Gardner 072884f451 build: use 'baseos' as repo for iproute install
The rook/ceph Dockerfile uses dnf to ensure iproute (containing the 'ip'
CLI tool) is installed in the Rook image for Multus usage. This comes
from the 'baseos' repo, but if any other repos are unavailable
temporarily, it can cause the container build to fail.

Use the '--repo baseos' flag to help prevent these kinds of failures.
Additionally, this will speed up the build slightly since it does not
attempt to load any non-necessary repos.

This change may make the container build slightly fragile in the future
if CentOS changes the name of its baseos repo, or if the Ceph image
switches to a non-CentOS base image.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-03-04 11:08:48 -07:00

40 lines
1.5 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
# install 'ip' tool for Multus
RUN dnf install -y --repo baseos --setopt=install_weak_deps=False iproute && dnf clean all
# 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/
COPY ceph-csv-templates /etc/ceph-csv-templates
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 [""]