|Daniel Wiesenberg 38ac3e42be||1 month ago|
|README.md||1 month ago|
|docker-compose.override.traefik.yml||1 month ago|
|docker-compose.traefik.yml||1 month ago|
Note: To run and use Conduit you should probably use it with a Domain or Subdomain behind a reverse proxy (like Nginx, Traefik, Apache, ...) with a Lets Encrypt certificate.
The Dockerfile provided by Conduit has two stages, each of which creates an image.
The Dockerfile includes a few build arguments that should be supplied when building it.
ARG LOCAL=false ARG CREATED ARG VERSION ARG GIT_REF=HEAD
org.opencontainers.image.created. Supply by it like this
$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.version. If you have a
Cargo.tomlin your build context, you can get it with
$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)
HEADor a commit ID. The supplied ref will be used to create the Open Container Initiative compliant label
org.opencontainers.image.revisionand will be the ref that is cloned from the repository when not building from the local context. If not supplied with the build command, it will default to
To build the image you can use the following command
docker build . -t matrixconduit/matrix-conduit:latest --build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)
which also will tag the resulting image as
Note: it ommits the two optional
After building the image you can simply run it with
docker run -d matrixconduit/matrix-conduit:latest -p 8448:8000 -v db:/srv/conduit/.local/share/conduit -e ROCKET_SERVER_NAME="localhost:8000"
For detached mode, you also need to use the
-d flag. You can pass in more env vars as are shown here, for an overview of possible values, you can take a look at the
If you just want to test Conduit for a short time, you can use the
--rm flag, which will clean up everything related to your container after you stop it.
If the docker command is not for you or your setup, you can also use one of the provided
docker-compose files. Depending on your proxy setup, use the
docker-compose.override.traefik.yml or the normal
docker-compose.yml for every other reverse proxy.
To build the Conduit image with docker-compose, you first need to open and modify the
docker-compose.yml file. There you need to comment the
image: option and uncomment the
build: option. Then call docker-compose with:
CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up
This will also start the container right afterwards, so if want it to run in detached mode, you also should use the
-d flag. For possible
build-args, please take a look at the above
Build & Dockerfile section.
If you already have built the image, you can just start the container and everything else in the compose file in detached mode with:
docker-compose up -d