How to build Ubuntu Ceph OCI Images

Canonical’s Ceph-Containers Repository is the home for apparatus to build Ubuntu based Ceph container Images. These can be used with popular containerised ceph deployment and orchestration tools like Cephadm and Rook.

Listing the contents of the repository:

ceph.defaults
confd/
custom-image-spec
Dockerfile
Dockerfile.daemon_base
Dockerfile.service
docker_scripts/
LICENSE
README.md
s3cfg
scripts/
test/

You see that we provide a Dockerfile that can be used to build the image and the supporting scripts that go with it. Hence we can simply use Docker to build an image:

$ sudo docker build -t canonical/ceph:latest .
Sending build context to Docker daemon  1.655MB
Step 1/27 : FROM ubuntu:jammy
 ---> 6b7dfa7e8fdb
...
...
 ---> Running in f431f665b976
Removing intermediate container f431f665b976
 ---> 4edce85e2d97
Successfully built 4edce85e2d97
Successfully tagged canonical/ceph:latest

All images available locally can be checked through:

$ sudo docker images
REPOSITORY     TAG    IMAGE ID     CREATED            SIZE
canonical/ceph latest 4edce85e2d97 About a minute ago 1.49GB
ubuntu         jammy  6b7dfa7e8fdb 4 weeks ago        77.8MB

This freshly baked Image can now be used for deploying Ceph using:

  1. Cephadm
  2. Rook