Created
April 4, 2019 21:15
-
-
Save n1zzo/633bce5c62bb2d47db2fb490618297eb to your computer and use it in GitHub Desktop.
Prosody Alpine Build + Run Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
prosody: | |
container_name: prosody | |
build: . | |
restart: always | |
user: "${UID}:${GID}" | |
ports: | |
- "5222:5222" | |
- "5269:5269" | |
- "127.0.0.1:5347:5347" | |
- "5280:5280" | |
- "5281:5281" | |
volumes: | |
- /var/docker/prosody/etc:/etc/prosody | |
- /var/docker/prosody/log:/var/log/prosody | |
- /var/docker/prosody/modules:/usr/lib/prosody-modules | |
- /var/docker/prosody/lib:/var/lib/prosody |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.8 | |
MAINTAINER Niccolò Izzo <izzo.niccolo@gmail.com> | |
ARG version=0.11.2 | |
# Runtime dependencies | |
RUN apk --update add --no-cache lua-dev sqlite openssl libidn ca-certificates lua-dbi lua-expat lua-filesystem lua-sec lua-socket lua-lzlib | |
# Build dependencies | |
RUN apk --update add --virtual build-dependencies alpine-sdk lua-dev openssl openssl-dev libidn-dev build-base linux-headers luarocks && \ | |
wget https://prosody.im/downloads/source/prosody-$version.tar.gz && \ | |
tar xzf prosody-$version.tar.gz && \ | |
rm -rf prosody-$version.tar.gz && \ | |
cd prosody-$version && \ | |
./configure && make && make install && \ | |
luarocks-5.1 install luabitop && \ | |
apk del build-dependencies | |
EXPOSE 5222 5269 5347 5280 5281 | |
CMD ["prosody"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment