Do easier deployments, add README

This commit is contained in:
Lloyd Watkin 2014-11-13 15:21:28 +00:00
parent 87083022eb
commit 4e6069cf97
3 changed files with 71 additions and 9 deletions

View file

@ -12,17 +12,14 @@ WORKDIR /data
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y mercurial python-setuptools python-dev build-essential libidn11-dev libssl-dev wget bsdmainutils
CMD useradd -ms /bin/bash prosody && groupadd prosody && useradd -G prosody prosody
RUN echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
RUN wget https://prosody.im/files/prosody-debian-packages.key -O- | apt-key add -
COPY ./build-file.deb /data/prosody.deb
RUN dpkg -i /data/prosody.deb
RUN apt-get update
RUN apt-get install -y lua5.2 luajit luarocks lua-event lua-zlib lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3 lua-socket liblua5.1-expat0 liblua5.1-filesystem0 lua-sec
RUN hg clone http://hg.prosody.im/trunk prosody
RUN cd prosody && ./configure --ostype=debian && make && make install
RUN apt-get install -y lua-event lua-zlib lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3
EXPOSE 443 80 5222 5269 5347 5280
CMD prosodyctl start
CMD prosodyctl start

49
README.md Normal file
View file

@ -0,0 +1,49 @@
# 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/).
It works by coping in a recently built `deb` file and running the install on the system.
Docker images are built off an __Ubuntu 14.04 LTS__ base.
```bash
docker run -d prosody/prosody --name prosody -p 5222:5222
```
## Ports
The image exposes the following ports to the docker host:
* __80__: HTTP port
* __5222__: c2s port
* __5269__: s2s port
* __5347__: XMPP component port
* __5280__: BOSH / websocket port
Note: These default ports can be changed in your configuration file. Therefore if you change these ports will not be exposed.
## Volumes
Volumes can be mounted at the following locations for adding in files:
* __/etc/prosody__:
* Prosody configuration file(s)
* 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
* __/usr/lib/prosody-modules__ (suggested):
* Location for including additional modules
* Note: This needs to be included in your config file, see http://prosody.im/doc/installing_modules#paths
## Example
```
docker run -d prosody/prosody:0.9 \
-p 5222:5222 \
-p 5269:5269 \
-p localhost:5347:5347 \
-v /etc/prosody /data/prosody/configuration \
-v /var/log/prosody /logs/prosody \
-v /usr/lib/prosody-modules /data/prosody/modules
```

16
build-docker.sh Executable file
View file

@ -0,0 +1,16 @@
# /bin/bash
if [[ -z "$1" ]]; then
echo "Usage: ./build-docker.sh def_file_name version_number"
exit 1
fi
if [[ -z "$2" ]]; then
echo "Usage: ./build-docker.sh def_file_name version_number"
exit 1
fi
cp $1 ./prosody.deb
docker build -t prosody/prosody:$2 .
docker push prosody/prosody
docker rmi prosody/prosody:$2