Update README for new version of Dockerfile
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
This is the Prosody Docker image building repository. It is used by our build server to build and publish Docker images for stable releases and nightly builds.
|
||||
|
||||
**Note:** Using this Dockerfile outside of our build server is not a supported use-case. There are many
|
||||
alternative Dockerfiles for Prosody available which can be used for this:
|
||||
There are many alternative Dockerfiles for Prosody available if this one
|
||||
does not suit your needs:
|
||||
|
||||
- [OpusVL/prosody-docker](https://github.com/OpusVL/prosody-docker/)
|
||||
- [unclev/prosody-docker-extended](https://github.com/unclev/prosody-docker-extended)
|
||||
@@ -14,7 +14,7 @@ For images please see here: [Prosody on Docker](https://hub.docker.com/r/prosody
|
||||
|
||||
## Running
|
||||
|
||||
It works by copying in a recently built `deb` file and running the install on the system.
|
||||
It works by enabling the [prosody package repository](https://prosody.im/download/package_repository) and installing the selected Prosody package from there based on the `PROSODY_PACKAGE` build argument.
|
||||
|
||||
Docker images are built off an __Debian 12 (bookworm)__ base.
|
||||
|
||||
@@ -33,6 +33,7 @@ Any error from this script is ignored. Prosody will not check the user exists be
|
||||
The image exposes the following ports to the docker host:
|
||||
|
||||
* __80__: HTTP port
|
||||
* __443__: HTTPS port
|
||||
* __5222__: c2s port
|
||||
* __5269__: s2s port
|
||||
* __5347__: XMPP component port
|
||||
@@ -47,41 +48,65 @@ Volumes can be mounted at the following locations for adding in files:
|
||||
|
||||
* __/etc/prosody__:
|
||||
* Prosody configuration file(s)
|
||||
* __/etc/prosody/certs__:
|
||||
* SSL certificates
|
||||
* __/var/log/prosody__:
|
||||
* Log files for prosody - if not mounted these will be stored on the system
|
||||
* Note: This location can be changed in the configuration, update to match
|
||||
* Also note: The log directory on the host (/logs/prosody in the example below) must be writeable by the prosody user
|
||||
* __/usr/lib/prosody-modules__ (suggested):
|
||||
* __/etc/prosody/modules__:
|
||||
* Location for including additional modules
|
||||
* Note: This needs to be included in your config file, see http://prosody.im/doc/installing_modules#paths
|
||||
|
||||
### Environment Variables
|
||||
|
||||
* `DOMAIN`, `LOCAL`, `PASSWORD` - These three are used by `entrypoint.sh` to create an initial account `$LOCAL@$DOMAIN` with `$PASSWORD` as password.
|
||||
* `PROSODY_PLUGIN_PATHS` - Comma-separated list of additional paths to search for plugins. Defaults to `/etc/prosody/modules`.
|
||||
* `PROSODY_ADMINS` - Comma-separated list of user addresses treated as admins.
|
||||
* `PROSODY_ENABLE_MODULES` - Comma-separated list of additional plugins to load.
|
||||
* `PROSODY_DISABLE_MODULES` - Comma-separated list of modules to disable, e.g. for auto-enabled modules.
|
||||
* `PROSODY_TURN_HOST` - Hostname of TURN server
|
||||
* `PROSODY_TURN_PORT` - Port number of TURN server
|
||||
* `PROSODY_TURN_SECRET` - Shared secret for TURN
|
||||
* `PROSODY_TURN_TLS_PORT` - Port number for STUN over TLS
|
||||
* `PROSODY_RETENTION_DAYS` - How many days worth of message archives and shared file to keep.
|
||||
* `PROSODY_S2S_SECURE_AUTH` - Whether to require that remote servers present valid certificates. Enabled by default.
|
||||
* `PROSODY_C2S_RATE_LIMIT` - Rate limit for client-to-server connections. Defaults to `10kb/s`.
|
||||
* `PROSODY_S2S_RATE_LIMIT` - Rate limit for server-to-server connections. Defaults to `30kb/s`.
|
||||
* `PROSODY_STORAGE` - [Storage driver](https://prosody.im/doc/storage) to use. Defaults to `internal`.
|
||||
* `PROSODY_SQL_DRIVER` - One of `SQLite3`, `PostgreSQL` or `MySQL`. Selects SQL backend when `PROSODY_STORAGE` is set to `sql`.
|
||||
* `PROSODY_SQL_DB` - Name of SQL database to use.
|
||||
* `PROSODY_SQL_HOST` - Hostname of SQL database to connect to (PostgreSQL and MySQL only).
|
||||
* `PROSODY_SQL_USERNAME`, `PROSODY_SQL_PASSWORD` - Credentials for connecting to SQL database.
|
||||
* `PROSODY_ARCHIVE_EXPIRY_DAYS` - When set, overrides `PROSODY_RETENTION_DAYS` for message archives.
|
||||
* `PROSODY_LOGLEVEL` - Log level, one of `debug`, `info`, `warn`, `error`. Defaults to `info`.
|
||||
* `PROSODY_STATISTICS` - [Statistics provider](https://prosody.im/doc/statistics) to use, e.g. `internal`. Default disabled.
|
||||
* `PROSODY_STATISTICS_INTERVAL` - Statistics collection interval. A number or the string `manual` for OpenMetrics-triggered collection. Defaults to `60`.
|
||||
* `PROSODY_CERTIFICATES` - Path to TLS certificates and private keys, relative to the config file. Defaults to `certs`, i.e.
|
||||
* `PROSODY_VIRTUAL_HOSTS` - Comma-separated list of domain names to initialize as hosts that provide user accounts. Defaults to the hostname of the container. `/etc/prosody/certs`.
|
||||
* `PROSODY_NETWORK_HOSTNAME` - Public domain name for use with e.g. HTTP. Defaults to the first entry in `PROSODY_VIRTUAL_HOSTS`.
|
||||
* `PROSODY_COMPONENTS` - Comma-separated list of _internal_ components in the form `name.example.com:type` where `type` can be e.g. `muc`, `http_file_share`.
|
||||
* `PROSODY_MUC_MODULES` - Comma-separated list of additional modules to enable on a MUC component.
|
||||
* `PROSODY_UPLOAD_EXPIRY_DAYS` - When set, overrides `PROSODY_RETENTION_DAYS` for uploaded files.
|
||||
* `PROSODY_UPLOAD_LIMIT_MB` - Size limit in MiB for individual uploaded files.
|
||||
* `PROSODY_UPLOAD_STORAGE_GB` - Total amount of storage available for file uploads.
|
||||
* `PROSODY_EXTERNAL_COMPONENTS` - Comma-separated list of _external_ components, in the form of `name.example.com:secret`.
|
||||
* `PROSODY_COMPONENT_SECRET` - Component shared secret if not provided as part of `PROSODY_EXTERNAL_COMPONENTS`.
|
||||
* `PROSODY_EXTRA_CONFIG` - Path to additional configuration file. Can contain wildcards. Defaults to `/etc/prosody/conf.d/*.cfg.lua`.
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```
|
||||
docker run -d \
|
||||
```bash
|
||||
docker run -it \
|
||||
-p 5222:5222 \
|
||||
-p 5269:5269 \
|
||||
-p localhost:5347:5347 \
|
||||
-e LOCAL=romeo \
|
||||
-e DOMAIN=shakespeare.lit \
|
||||
-e PASSWORD=juliet4ever \
|
||||
-v /data/prosody/configuration:/etc/prosody \
|
||||
-v /logs/prosody:/var/log/prosody \
|
||||
-v /data/prosody/modules:/usr/lib/prosody-modules \
|
||||
prosody/prosody:0.9
|
||||
prosody/prosody:0.12
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
Use the `build-docker.sh` script as follows:
|
||||
|
||||
```bash
|
||||
./build-docker.sh /path/to/built-image.deb version_tag [, ...version_tag2, ...]
|
||||
docker build --build-arg PROSODY_PACKAGE=prosody-0.12 -t prosody/prosody:0.12 .
|
||||
```
|
||||
|
||||
Where argument 1 is a pointer to the build `deb` file that you'd like to make an image from and 'version_tag' is the tag you'd like to push to the Docker registry with.
|
||||
|
||||
You can specify multiple tags by adding additional tag names to the end of the command. This is useful where a for example release 0.10.4 is made which also consitutes 'latest', '0.10-nightly', '0.10.4', '0.10' images.
|
||||
|
||||
After running the script will clean up any images generated (but not the base images - for efficiency purposes).
|
||||
|
||||
Reference in New Issue
Block a user