Just to be clear, the Python SQL library doesn’t need to be installed - it’s already in Python!
The dockerfile could be extremely simple - it all really depends on your use case! But this is one I’ve just thrown together with good results:
RUN apt update && apt install -y python-pip
RUN pip install kolibri
CMD kolibri start --foreground
You could simply save this into a file named
Dockerfile, then run
docker build. If you want, you could tag it with:
docker build -t kolibri
So far, everything I’ve described is happening during build time. The volume mount, however, has to happen during runtime. So if you build the image and tag it using
-t kolibri, as described above, you could do something like:
docker run -it --rm -v kolibri_home:/root/.kolibri cloud-kolibri bash
This will run a docker container with command line input that is automatically removed when finished. It should also create a docker volume named
kolibri_home if one doesn’t already exist.
This is a very rudimentary setup - I didn’t want to assume anything about your use case. Please feel free to modify according to your use case, as you probably have your own reasons for using Docker containers to begin with.