The official RocksDB docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current RocksDB docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
RocksDB is a high performance embedded key-value store for fast storage, developed by Meta. It is a persistent key-value store for fast storage environments based on a Log-Structured Merge Tree, and is widely used as the storage engine behind databases such as Kvrocks, TiDB and MyRocks.
Learn more on RocksDB.
The tag of each rocksdb docker image is consist of the version of rocksdb and the version of basic image. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 11.8.1-oe2403sp4 | rocksdb 11.8.1 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
| 8.3.3-oe2403sp4 | rocksdb 8.3.3 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
| 7.9.2-oe2403sp4 | rocksdb 7.9.2 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements.
Pull the openeuler/rocksdb image from docker
docker pull openeuler/rocksdb:{Tag}
Compile a program against the installed RocksDB library
Create a file named rocksdb_example.cpp with the following content:
#include <cassert>
#include <string>
#include <rocksdb/db.h>
int main() {
rocksdb::DB* db;
rocksdb::Options options;
options.create_if_missing = true;
rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testdb", &db);
assert(status.ok());
const std::string key = "hello";
const std::string value = "openEuler";
status = db->Put(rocksdb::WriteOptions(), key, value);
assert(status.ok());
std::string result;
status = db->Get(rocksdb::ReadOptions(), key, &result);
assert(status.ok() && result == value);
delete db;
return 0;
}
Then compile and run it inside the container:
docker run --rm -v $(pwd):/workspace openeuler/rocksdb:{Tag} \
g++ -std=c++17 -O2 /workspace/rocksdb_example.cpp -o /workspace/rocksdb_example \
-I/usr/local/include -L/usr/local/lib -lrocksdb -lsnappy -lzstd -lz -lpthread
docker run --rm -v $(pwd):/workspace openeuler/rocksdb:{Tag} /workspace/rocksdb_example
Run the bundled db_bench benchmark
docker run --rm openeuler/rocksdb:{Tag} db_bench --benchmarks=fillseq,readrandom --num=100000
View container logs
docker logs -f my-rocksdb
Open an interactive shell
docker run -it --rm openeuler/rocksdb:{Tag} bash
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.
Content type
Image
Digest
sha256:221d88802…
Size
85.3 MB
Last updated
2 days ago
docker pull openeuler/rocksdb