If you want to run matrix-commander
using Docker, there is an official image
available on 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.
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).
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
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.
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 --login password
You can now use this data folder to send messages or verify your session.
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>"
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
When using docker, please understand how docker works with pipes. Read issue 8go#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.
See Issue 8go#25 for more info:
The libraries
libffi-devel libjpeg-devel zlib-devel
were added to the
dnf install
command.
The command
pip3 install wheel &&
was added to the
pip3 install
command.