Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12dcdb0c64 | |||
| 56160ac766 | |||
| a99fbcc814 | |||
| 712f293389 | |||
| eb205258f8 | |||
| 6f17c6ed1e | |||
| 7ea4bfbdae | |||
| e4cf4e52de | |||
| 1d8b665909 |
+4
-2
@@ -17,12 +17,14 @@ RUN apt-get install -y openssl lua5.1 lua-expat lua-socket lua-filesystem \
|
||||
lua-dbi-sqlite3 libssl1.0.0 lua-sec lua-zlib liblua5.1-expat0
|
||||
|
||||
COPY ./prosody.deb /data/prosody.deb
|
||||
COPY ./start.sh /data/start.sh
|
||||
|
||||
RUN chmod 700 /data/start.sh
|
||||
RUN dpkg -i /data/prosody.deb
|
||||
|
||||
# If using default configuration keep a process alive
|
||||
RUN echo 'daemonize = false;' | cat - /etc/prosody/prosody.cfg.lua > temp && mv temp /etc/prosody/prosody.cfg.lua
|
||||
|
||||
EXPOSE 443 80 5222 5269 5347 5280
|
||||
EXPOSE 443 80 5222 5269 5347 5280 5281
|
||||
|
||||
ENTRYPOINT prosodyctl start
|
||||
ENTRYPOINT /data/start.sh
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Prosody Docker
|
||||
|
||||
This is the Prosody Docker image building repository. Its only really designed to be used on the Prosody build server for pushing to the [Docker registry](https://registry.hub.docker.com/repos/prosody/).
|
||||
This is the Prosody Docker image building repository. Its only really designed to be used on the Prosody build server for pushing to the [Docker registry](https://registry.hub.docker.com).
|
||||
|
||||
For images please see here: [Prosody on Docker](https://registry.hub.docker.com/u/prosody/prosody/).
|
||||
|
||||
It works by coping in a recently built `deb` file and running the install on the system.
|
||||
|
||||
@@ -12,6 +14,12 @@ Docker images are built off an __Ubuntu 14.04 LTS__ base.
|
||||
docker run -d prosody/prosody --name prosody -p 5222:5222
|
||||
```
|
||||
|
||||
On startup the image will create a default user of `admin@localhost` with password `password`. This can be changed by using environment variables `LOCAL`, `DOMAIN`, and `PASSWORD`. This performs the following action on startup:
|
||||
|
||||
prosodyctl register *local* *domain* *password*
|
||||
|
||||
Any error from this script is ignored. Prosody will not check the user exists before running the command (i.e. existing users will be overwritten). It is expected that [mod_admin_adhoc](http://prosody.im/doc/modules/mod_admin_adhoc) will then be in place for managing users (and the server).
|
||||
|
||||
### Ports
|
||||
|
||||
The image exposes the following ports to the docker host:
|
||||
@@ -21,6 +29,7 @@ The image exposes the following ports to the docker host:
|
||||
* __5269__: s2s port
|
||||
* __5347__: XMPP component port
|
||||
* __5280__: BOSH / websocket port
|
||||
* __5281__: Secure BOSH / websocket port
|
||||
|
||||
Note: These default ports can be changed in your configuration file. Therefore if you change these ports will not be exposed.
|
||||
|
||||
@@ -45,6 +54,9 @@ docker run -d prosody/prosody:0.9 \
|
||||
-p 5222:5222 \
|
||||
-p 5269:5269 \
|
||||
-p localhost:5347:5347 \
|
||||
-e LOCAL=romeo \
|
||||
-e DOMAIN=shakespeare.lit \
|
||||
-e PASSWORD=juliet4ever \
|
||||
-v /etc/prosody /data/prosody/configuration \
|
||||
-v /var/log/prosody /logs/prosody \
|
||||
-v /usr/lib/prosody-modules /data/prosody/modules
|
||||
@@ -55,7 +67,11 @@ docker run -d prosody/prosody:0.9 \
|
||||
Use the `build-docker.sh` script as follows:
|
||||
|
||||
```bash
|
||||
./build-docker.sh /path/to/built-image.deb version_tag
|
||||
./build-docker.sh /path/to/built-image.deb version_tag [, ...version_tag2, ...]
|
||||
```
|
||||
|
||||
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. After running the script will clean up any images generated (but not the base images - for efficiency purposes).
|
||||
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).
|
||||
|
||||
+9
-1
@@ -13,8 +13,16 @@ fi
|
||||
echo "Starting build..."
|
||||
cp $1 ./prosody.deb
|
||||
docker build -t prosody/prosody:$2 .
|
||||
for i in "${@:3}"; do
|
||||
echo "Also building tag $i"
|
||||
docker build -t prosody/prosody:$i .
|
||||
done
|
||||
docker push prosody/prosody
|
||||
|
||||
echo "Cleaning up..."
|
||||
docker rmi prosody/prosody:$2
|
||||
rm ./prosody.deb
|
||||
for i in "${@:3}"; do
|
||||
echo "Also cleaning tag $i"
|
||||
docker rmi prosody/prosody:$i
|
||||
done
|
||||
rm ./prosody.deb
|
||||
|
||||
Reference in New Issue
Block a user