Feat: supply etc config via Docker volume

This commit is contained in:
Michele Bologna
2019-01-15 19:50:59 +01:00
parent 0aa7d2f2a8
commit 569c59f0d6
4 changed files with 191 additions and 25 deletions

View File

@@ -70,17 +70,12 @@ rm -fr telegram-purple* && \
rm -fr v1.1.2.tar.gz bitlbee-facebook-* && \
rm -fr purple-hangouts && \
rm -rf bitlbee-mastodon && \
mkdir -p /var/lib/bitlbee && \
chown -R daemon:daemon /var/lib/bitlbee* # dup: otherwise it won't be chown'ed when using volumes
COPY etc/bitlbee/bitlbee.conf /usr/local/etc/bitlbee/bitlbee.conf
COPY etc/bitlbee/motd.txt /usr/local/etc/bitlbee/motd.txt
# add user bitlbee
adduser --system --home /var/lib/bitlbee --disabled-password --disabled-login --shell /usr/sbin/nologin bitlbee && \
touch /var/run/bitlbee.pid && chown bitlbee:nogroup /var/run/bitlbee.pid
VOLUME ["/usr/local/etc/bitlbee"]
VOLUME ["/var/lib/bitlbee"]
RUN touch /var/run/bitlbee.pid && \
chown daemon:daemon /var/run/bitlbee.pid && \
chown -R daemon:daemon /usr/local/etc/* && \
chown -R daemon:daemon /var/lib/bitlbee* # dup: otherwise it won't be chown'ed when using volumes
USER daemon
EXPOSE 6667
CMD ["/usr/local/sbin/bitlbee", "-c", "/usr/local/etc/bitlbee/bitlbee.conf", "-n", "-u", "daemon"]
CMD ["/usr/local/sbin/bitlbee", "-c", "/usr/local/etc/bitlbee/bitlbee.conf", "-n", "-v"]
USER bitlbee