Running With Docker on Your Machine
Estimated Time
Starting from scratch, running Catena on your machine using Docker is estimated to take 10-20 minutes.
What Is Docker?
Docker is a tool used to create, deploy, and run applications using containers. Containers are similar to virtual machines, but they don’t create an entire virtual operating system. Once an application is built and packaged into a container alongside its dependencies, it can be run quickly and reliably from different computing environments. For more information about Docker and containers, you can refer to this piece of documentation from Docker.
Installation Instructions
1. Obtain Catena source code
Catena is distributed via Git. Instructions for installing Git can be found here.
To gain access to the Catena Source, please contact us to obtain a license. Once you have access, clone Catena to your machine.
git clone git@github.com:CatenaTools/catena-tools-core.git
2. Install WSL
There are two options for running with Docker: with Docker Desktop, or by using Docker Engine directly. Both options will require you to install WSL on your machine.
Full instructions for installing WSL can be found in these official Microsoft docs, but we've included a condensed version here.
- Open PowerShell in administrator mode by right-clicking and selecting “Run as administrator”
- Install WSL (We recommend using the Ubuntu 24.04 LTS distro.)
wsl --install -d Ubuntu-24.04
- Restart your machine
3. Install Docker
Using Docker Desktop
Docker Desktop is the easiest way to install Docker onto a Windows machine, though it requires a paid license for commercial use. If you prefer to register for a license, follow the instructions below. Otherwise, skip to Using Docker Engine Directly.
- Download Docker Desktop
- Begin installation
- Ensure you select Use WSL 2 instead of Hyper-V
- Once complete, start Docker Desktop
- From Powershell, check that Docker is working correctly:
docker run hello-world
# Expected output should include:
# Hello from Docker!
# This message shows that your installation appears to be working correctly.
docker compose version
# Expected output should include something similar to:
# Docker Compose version v2.32.1
- Proceed To Run Catena
Using Docker Engine Directly
- Open the Ubuntu-24.04 application, or whichever distro you chose when installing WSL
- Install Docker Engine using the
apt
repository using these instructions - Install Docker Compose using these instructions
- If you have not already, verify that Docker is working correctly
docker run hello-world
# Expected output should include:
# Hello from Docker!
# This message shows that your installation appears to be working correctly.
docker compose version
# Expected output should include something similar to:
# Docker Compose version v2.32.1
If either Docker or Docker Compose do not appear to be installed correctly, restart WSL, remove the packages, and go back to step 2.
sudo apt-get remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Add your user to the docker group
sudo usermod -aG docker $USER
- Tell Docker Engine you are not using Docker Desktop by replacing the automatically defined credential helper with empty JSON in Docker's config.
echo '{}' | sudo tee ~/.docker/config.json
- Proceed To Run Catena
4. Run Catena
- Depending on how you installed Docker, use the corresponding command prompt to navigate to the root directory of the Catena Project:
- Docker Desktop: Powershell
- Docker Engine: WSL
To navigate to a drive from WSL, such as your
C:\
drive, you will need tocd /mnt/c/<YOUR_INSTALLATION_DIRECTORY>
- Use Docker Compose to run the project (this may take a while)
docker compose up
- Check that Catena is running either by sending a request from this page using the provided interactive API, or by using cURL.
Send Request From This Page
Use cURL
- Localhost http://localhost:5000/api/v1/node_inspection/is_healthy
- Custom Domain https://your_domain_here/api/v1/node_inspection/is_healthy
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
http://localhost:5000/api/v1/node_inspection/is_healthy
{ "isHealthy": true }
What Does Docker Compose Run?
By default, running Docker Compose from Catena’s root directory will run a few different containers:
catena-tools-core
This is the Catena backend. The base
docker-compose.yaml
file will run with an assortment of Catena plugins enabled.kafka
One configuration of Catena will use Apache Kafka to send messages between services. This is not a requirement to run Catena, but we run it alongside Catena in case you decide to use it.
init-kafka
Kafka requires “topics” to be created in order to send messages. The
init-kafka
container handles creating these topics before Catena is started.redis
Catena uses Redis for ephemeral storage, such as a session store. This is not a requirement to run Catena, but we run it alongside Catena in case you decide to use it.
What Next?
By default, Catena is run with an assortment of plugins enabled. We recommend exploring what is possible with our included plugins before experimenting with swapping them out for other modules.