Docker files for building the ceph project under different OSs and version.
Before you start please install
podman
(e.g.sudo dnf install podman
)
- clone the ceph repo (e.g.
git clone https://github.com/ceph/ceph.git /path/to/ceph
) - run
do_cmake.sh
inside the ceph directory
note:
- that the
build
directories inside and outside the container are different- source code is the same, and can only be modified from outside the container
- the
build
directory inside the container is persistent, so the incremental builds are possible
- To build all images use:
make image
- To build ceph inside these images use
make build
. Please set theCEPH_DIR
env variable to point to where the ceph code tree - To build a specific target, run the above commands inside the target's directory
- To build the images and ceph manually use the following commands from inside the different subdirectories:
- inside a specific directory, run:
podman build . -t <image name>
- inside a specific directory, run:
podman run --rm --privileged --mount type=bind,src=/path/to/ceph,dst=/ceph,ro,bind-nonrecursive --mount type=volume,src=<volume name>,dst=/ceph/build <image name>
note: use different volume names for each image
for example, to run one of the unit tests use:
podman run --rm --privileged --mount type=bind,src=/path/to/ceph,dst=/ceph --mount type=volume,src=<volume name>,dst=/ceph/build <image name> /ceph/build/bin/unittest_rgw_amqp