You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
||8 months ago|
|Dockerfile||8 months ago|
|README.adoc||8 months ago|
= matrix-commander on Docker Hub
If you want to run `matrix-commander` using Docker, there is an official image
available on https://hub.docker.com/r/matrixcommander/matrix-commander[Docker Hub]
built from source on each commit and hence easier to run, since only Docker is
required (:clap: to @pataquets for his PR).
The image is based on the latest version of Fedora (35 as of Jun '22).
There is a `linux/amd64` and a `linux/arm64` version available.
Download/update your local image pulling it by doing:
docker pull matrixcommander/matrix-commander
When using Docker, it is recommended to use the `--no-sso` flag because
there is no browser available to perform web-based Single Sign-On.
= matrix-commander with Docker
NOTE: In the following docker commands, the option `:z` is here to make sure that the commands work in systems that use SELinux (eg. Fedora).
For other systems, this options has no influence and can be ignored or removed.
The provided `Dockerfile` builds `matrix-commander` using Fedora 35. If you want to use `Debian`, `Ubuntu` or otherwise, you *must* adjust the `Dockerfile` (e.g. change `dnf` to `apt` and so forth).
== Building the image
From the root folder of the git repository, run:
docker build -t matrix-commander -f docker/Dockerfile .
This will create an image called `matrix-commander`.
Alternatively, you can build the Docker image directly from sources, without cloning the repo:
docker build -t matrix-commander -f docker/Dockerfile github.com/8go/matrix-commander
== Using the image
This image requires a folder where `matrix-commander` will store data for credentials and end-to-end encryption.
This folder must be provided to further `run` commands using the `/data` mountpoint.
=== Initialization (only do this once)
Run this command to initialize the `matrix-commander` data folder with new credentials − you must answer all the questions that will pop up interactively (homeserver, username, etc.):
docker run --rm -ti -v /my/chosen/folder:/data:z matrix-commander --no-ssl
You can now use this data folder to send messages or verify your session.
=== Send a message to a room
Given an initialized data folder, run this command to send a message to a room:
docker run --rm -v /my/chosen/folder:/data:z matrix-commander -r "<room id>" -m "<some message>"
=== Verify the session
Given an initialized data folder, run this command to start the verification of the matrix-commander session from another existing matrix session:
docker run --rm -ti -v /my/chosen/folder:/data:z matrix-commander --verify
=== How to deal with pipes
When using docker, please understand how docker works with pipes. Read issue 27
This has nothing to do with matrix-commander, but nontheless here are some examples.
In a nutshell:
df -h | docker run --rm -v ./data:/data matrix-commander --code
The above line will *NOT* work. This is not how pipes work in docker.
docker run --rm -ti -v ./data:/data matrix-commander -k -m "$(df -h| head -2)"
The above line works, as there is no pipe into docker.
df -h | head -2 | docker run --rm -i -v ./data:/data matrix-commander --code
The above line works, because -t is *NOT* used.
= matrix-commander with Docker on Raspberry Pi (4b, 32bit, running buster of Raspberry Pi OS)
See Issue #25 for more info:
libffi-devel libjpeg-devel zlib-devel
were added to the
pip3 install wheel &&
was added to the