Following this article from StarRocks documentation, I’ve found that the REST catalog does not survive after a docker compose down/up
cycle.
It seems it is using a SQLite database in /tmp
.
What would be a best practice to keep the catalog persistent?
Fusing
November 4, 2024, 9:49pm
2
Presuming you’re using the Tabular.IO iceberg-rest image…
I had the same problem - here’s how to fix it:
From lines 67-68 of the source code here
it tells us that it stores the catalog metadata in an SQLite memory store, so do this in your compose file (or add to your docker run command):
environment:
- CATALOG_URI=jdbc:sqlite:file:/home/iceberg/iceberg.db
Then map a volume to your /home/iceberg folder:
volumes:
- <local-path-or-docker-volume>:/home/iceberg
If the iceberg-rest container reports issues creating the database, just make sure you have the correct permissions set on your local system. This should do the trick!