Does it compose?
One question I have increasingly asked myself in the past few years. Meaning
Can I run this open source software using Docker containers and a Docker Compose file?
As the Docker project turned ten this spring, it has become standard practice to distribute open source software via Docker images and to provide a Docker Compose file to run the software together with other dependencies. The Awesome Compose project has collected many examples, and all you need is a
docker-compose.ymlfile and a recent installation of Docker, e.g. Docker Desktop. Be aware that Docker Compose has evolved over the years. It started out as a dedicated Python application but was later integrated into the Docker application (written in Go) as Compose V2.
Docker and Docker Compose allow you to run pretty complex applications without first addressing a long list of requirements (which might conflict with other software you have installed), or needing a long and complex build step where many things can go wrong. For example a self-hosted instance of Supabase (a hosted Postgres database with additional features) that I installed last week following these instructions.
An important open source project that I am involved in is InvenioRDM, the turn-key research data management repository. InvenioRDM started in 2019, with a first production-suitable version in August 2021, and the next major goal is to have the large and popular Zenodo repository running on top of InvenioRDM. Zenodo turned ten last week, a few weeks after Docker. Interestingly, my personal tenth anniversary was last year in May as I became a full-time software developer and left academic medicine as a medical doctor treating cancer patients in May 2012.
Unfortunately, InvenioRDM "doesn't compose" yet. It is very close, but there are no ready-made Docker images to download, and the installation instructions start with installing a Python command-line tool (invenio-cli). So if you have 1-2 hours to play with InvenioRDM and get a first impression, there is no official solution from the InvenioRDM project yet. For this reason, I started the docker-invenio-rdm repository on Github. It contains a Docker Compose file that uses pre-built Docker images, and using that file with a
docker compose upcommand on your local computer should give you a running InvenioRDM within 15 minutes:
I started this recently and obviously want to move forward in two directions:
- fine-tune the initial configuration to provide a great initial experience with InvenioRDM, e.g. making it easy to theme the InvenioRDM instance
- make this an official part of the InvenioRDM project, extending the docker-invenio GitHub repository that provides Docker base images for InvenioRDM and other projects using the Invenio software.
But of course, Docker Compose is not the answer to all questions regarding running Docker-based infrastructure. For production environments, most people shy away from using Docker Compose. The reasons for that and the alternatives will be the topic of a future blog post (spoiler: there is exciting news).
Docker Compose also needs more work to be set up correctly for development environments. It is a common practice and a workflow I used while working at DataCite (where we launched Docker-based infrastructure in 2016), but for now, the easiest way to set up InvenioRDM development environments is using the invenio-cli tool with a local development environment.
Please reach out to me with feedback on running Docker Compose for InvenioRDM (use the discussions feature in the GitHub repo), or if you have questions about running InvenioRDM in production.