7 Commits

3 changed files with 16 additions and 7 deletions
+5 -1
View File
@@ -13,6 +13,7 @@ RUN apt-get update \
libidn11 \
liblua5.1-expat0 \
libssl1.0.0 \
lua-bitop \
lua-dbi-mysql \
lua-dbi-postgresql \
lua-dbi-sqlite3 \
@@ -33,7 +34,10 @@ RUN dpkg -i /tmp/prosody.deb \
&& perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80 443 5222 5269 5347 5280 5281
CMD ["prosodyctl", "start"]
USER prosody
ENV __FLUSH_LOG yes
CMD ["prosody"]
+6 -6
View File
@@ -1,4 +1,4 @@
# /bin/bash
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Usage: ./build-docker.sh def_file_name version_number"
@@ -11,18 +11,18 @@ if [[ -z "$2" ]]; then
fi
echo "Starting build..."
cp $1 ./prosody.deb
docker build -t prosody/prosody:$2 .
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 .
docker build -t prosody/prosody:"$i" .
done
docker push prosody/prosody
echo "Cleaning up..."
docker rmi prosody/prosody:$2
docker rmi prosody/prosody:"$2"
for i in "${@:3}"; do
echo "Also cleaning tag $i"
docker rmi prosody/prosody:$i
docker rmi prosody/prosody:"$i"
done
rm ./prosody.deb
+5
View File
@@ -1,6 +1,11 @@
#!/bin/bash
set -e
if [[ "$1" != "prosody" ]]; then
exec prosodyctl $*
exit 0;
fi
if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
prosodyctl register $LOCAL $DOMAIN $PASSWORD
fi