docker build -t logos https://github.com/logos-co/logos-docker.git && docker run logosor, from a local checkout:
docker build -t logos .
docker run logosThe default CMD is logoscore -D -m /home/ubuntu/modules --persistence-path /etc/logos/persistence.
Three CLIs are installed and reachable on $PATH:
logoscore— Logos core runtimelgpm— Logos package managerlgpd— Logos package downloader
The image ships with the delivery, storage, and blockchain modules plus the
openmetrics scraper
pre-installed under /home/ubuntu/modules.
The container runs as the unprivileged ubuntu user. /app is root-owned and holds the extracted binaries; everything writable at runtime lives elsewhere:
/home/ubuntu/packages/— downloaded.lgxpackages/home/ubuntu/modules/— installed modules (passed tologoscorevia-m)/etc/logos/blockchain/— blockchain state written at runtime/etc/logos/persistence/— logoscore module instance persistence (passed via--persistence-path)
The bundled openmetrics
module serves a Prometheus-scrapeable /metrics endpoint. Run the container with
the port published, load the modules, then load and start openmetrics:
docker run -d -p 9090:9090 --name logos logos
docker exec logos logoscore load-module delivery_module
docker exec logos logoscore load-module storage_module
docker exec logos logoscore load-module liblogos_blockchain_module
docker exec logos logoscore load-module openmetrics
docker exec logos logoscore call openmetrics start '{"port":9090,"modules":["delivery_module","storage_module","liblogos_blockchain_module"]}'
curl http://localhost:9090/metricsFor a complete, runnable walkthrough — build, run, load the modules, initialize
openmetrics, and scrape /metrics from the host — see the doc-test in
doctests/ (rendered; run it with
cd doctests && ./run.sh).
Mount named volumes to keep state across container restarts:
/etc/logos/blockchain— blockchain state/etc/logos/persistence— logoscore module instance data (--persistence-path)
docker run \
-v logos-blockchain:/etc/logos/blockchain \
-v logos-persistence:/etc/logos/persistence \
logosUse named volumes (as above) rather than host bind mounts. The container runs
as the unprivileged ubuntu user (uid 1000), and these paths are created
ubuntu-owned in the image — so a fresh named volume inherits that ownership and
is writable with no chown. A host bind mount instead keeps the host path's
ownership, which may not be writable by the in-container ubuntu user; if you
must bind-mount, chown 1000:1000 the host directory first.