ceph/Dockerfile.build
John Mulligan 4304f848e6 src/script: rename CEPH_BRANCH to CEPH_BASE_BRANCH for build container
Previously, we were passing build argument of CEPH_BRANCH, but that was
a bit misleading as we expect the current branch to vary a bit (as users
will be using branches to develop and test the code). What we actually
care about is the base branch ('main', 'squid', etc) as that is fed into
our bootstrap script and we want the option to simple variations based
on the name of said base branch.
Rename CEPH_BRANCH to CEPH_BASE_BRANCH for clarity.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit a1d49d557c)
2025-03-06 16:14:27 -05:00

33 lines
849 B
Docker

ARG DISTRO
FROM scratch as bootstrap
ARG CEPH_CTR_SRC=/usr/local/src/ceph
COPY \
src/script/lib-build.sh \
src/script/run-make.sh \
${CEPH_CTR_SRC}/src/script/
COPY debian ${CEPH_CTR_SRC}/debian
COPY \
ceph.spec.in \
do_cmake.sh \
install-deps.sh \
run-make-check.sh \
src/script/buildcontainer-setup.sh \
${CEPH_CTR_SRC}
FROM $DISTRO
ENV FOR_MAKE_CHECK=1
ARG DISTRO
ARG CEPH_CTR_SRC=/usr/local/src/ceph
ARG CLEAN_DNF=yes
ARG CEPH_BASE_BRANCH=main
COPY --from=bootstrap ${CEPH_CTR_SRC} ${CEPH_CTR_SRC}
# Note that we do not use ENV for the following. This is because we do not
# want them permamently stored in the container's layer.
RUN DISTRO=$DISTRO \
CEPH_BASE_BRANCH=$CEPH_BASE_BRANCH \
CLEAN_DNF=$CLEAN_DNF \
CEPH_CTR_SRC=${CEPH_CTR_SRC} \
bash -x ${CEPH_CTR_SRC}/buildcontainer-setup.sh