We're setting up CI/CD pipelines using docker and ...
# questions-and-troubleshooting
w
We're setting up CI/CD pipelines using docker and the starrocks/allin1-ubuntu container, and we were wondering, is there a way of creating a default database in the catalog without having to execute the mysql client within the container?
j
The catalog is a living part that is meant to be dynamic, so I guess you're talking more on the part of the CI (deployment) rather than trying to bake a database in? For those cases depending on your platform you might want to have an init container that performs the check on the volume and otherwise creates on first bootstrap, however you need to ensure all components are up and running. Other pattern we have is to have K8s Jobs as part of the CI one the statefulset is ready
w
No actually it's the first one, trying to bake a standard default database, etc. into the container on startup as one might expect a
Copy code
docker-entrypoint-initdb.d
To be able to do
resolved this by running a
docker exec
command post startup.