Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ endif

image-cephcsi: GOARCH ?= $(shell go env GOARCH 2>/dev/null)
image-cephcsi: .container-cmd
$(CONTAINER_CMD) build $(CPUSET) -t $(CSI_IMAGE) -f deploy/cephcsi/image/Dockerfile . --build-arg CSI_IMAGE_NAME=$(CSI_IMAGE_NAME) --build-arg CSI_IMAGE_VERSION=$(CSI_IMAGE_VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) --build-arg GO_ARCH=$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE)
$(CONTAINER_CMD) build $(CPUSET) -t $(CSI_IMAGE) -f deploy/cephcsi/image/Dockerfile . --build-arg CSI_IMAGE_NAME=$(CSI_IMAGE_NAME) --build-arg CSI_IMAGE_VERSION=$(CSI_IMAGE_VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) --build-arg GO_ARCH=$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg CEPH_VERSION=$(CEPH_VERSION)

push-image-cephcsi: GOARCH ?= $(shell go env GOARCH 2>/dev/null)
push-image-cephcsi: .container-cmd image-cephcsi
Expand Down
11 changes: 10 additions & 1 deletion deploy/cephcsi/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG SRC_DIR="/go/src/github.com/ceph/ceph-csi/"
ARG GO_ARCH
ARG BASE_IMAGE
ARG FINAL_BASE_IMAGE="quay.io/centos/centos:stream9-minimal"

FROM ${BASE_IMAGE} as updated_base

Expand Down Expand Up @@ -70,9 +71,10 @@ COPY . ${SRC_DIR}
RUN make cephcsi

#-- Final container
FROM updated_base
FROM ${FINAL_BASE_IMAGE}

ARG SRC_DIR
ARG CEPH_VERSION

LABEL maintainers="Ceph-CSI Authors" \
version=${CSI_IMAGE_VERSION} \
Expand All @@ -81,6 +83,13 @@ LABEL maintainers="Ceph-CSI Authors" \

COPY --from=builder ${SRC_DIR}/_output/cephcsi /usr/local/bin/cephcsi

RUN true \
&& rpm -ivh https://download.ceph.com/rpm-${CEPH_VERSION}/el9/noarch/ceph-release-1-1.el9.noarch.rpm \
&& microdnf -y install kmod nfs-utils nvme-cli epel-release psmisc e2fsprogs xfsprogs cryptsetup attr --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
&& microdnf -y install thrift librados2 librbd1 libcephfs2 ceph-common ceph-fuse rbd-nbd --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
&& microdnf clean all \
&& true

# verify that all dynamically linked libraries are available
RUN [ $(ldd /usr/local/bin/cephcsi | grep -c '=> not found') = '0' ]

Expand Down
2 changes: 1 addition & 1 deletion e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ func getLuksStatus(selector, mountPath string, f *framework.Framework) (*cryptse
opt := metav1.ListOptions{
LabelSelector: selector,
}
cmd := fmt.Sprintf("mappedDev=$(findmnt -n -o SOURCE --target %s);sudo cryptsetup status $mappedDev;",
cmd := fmt.Sprintf("cryptsetup status $(findmnt -n -o SOURCE --target %s)",
mountPath)
stdOut, stdErr, err := execCommandInContainer(f, cmd, cephCSINamespace, "csi-rbdplugin", &opt)
if err != nil {
Expand Down
Loading