ceph Docker & Self-Hosted Deployment

GitHub

Ceph is a distributed object, block, and file storage platform

1. Pull Image (DOCKERHUB) docker pull ceph/ceph:latest
2. Docker Run (1-Click Launch) docker run -d --name ceph --restart always ceph/ceph:latest
3. Podman Run podman run -d --name ceph --restart always ceph/ceph:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/ceph/ceph:latest
5. ORAS Pull (OCI Artifact) oras pull ceph/ceph:latest
Dockerfile.build
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
ARG DISTRO
ARG CEPH_CTR_SRC=/usr/local/src/ceph
ARG CLEAN_DNF=yes
ARG CEPH_BASE_BRANCH=main
ARG SCCACHE_VERSION=v0.15.0
ARG SCCACHE_REPO=https://github.com/mozilla/sccache
ARG WITH_CRIMSON=true
ARG FOR_MAKE_CHECK=1
# Non-empty: fail the image build if the ceph-libboost packages can't be
# installed, instead of leaving boost to the submodule (see install-deps.sh).
# Off by default; CI that reuses images across builders turns it on with
# --build-arg=REQUIRE_BOOST_PKGS=1.
ARG REQUIRE_BOOST_PKGS=
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} \
    WITH_CRIMSON=${WITH_CRIMSON} \
    FOR_MAKE_CHECK=${FOR_MAKE_CHECK} \
    REQUIRE_BOOST_PKGS=${REQUIRE_BOOST_PKGS} \
    bash -x ${CEPH_CTR_SRC}/buildcontainer-setup.sh
RUN \
    if rpm --quiet --query sccache 2>/dev/null || { command -v dnf >/dev/null 2>&1 && dnf install -y sccache 2>/dev/null; }; then \
    echo "sccache provided by distro packages"; \
    elif [ $(uname -m) != ppc64le ]; then \
    SCCACHE_ARCH="$(uname -m)"; \
    if [ "$SCCACHE_ARCH" = riscv64 ]; then SCCACHE_ARCH=riscv64gc; fi; \
    SCCACHE_URL="${SCCACHE_REPO}/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-${SCCACHE_ARCH}-unknown-linux-musl.tar.gz"; \
    echo "${SCCACHE_URL}"; \
    curl -sS -L $SCCACHE_URL | tar --no-anchored --strip-components=1 -C /usr/local/bin/ -xzf - sccache; \
    fi