docker : cleanup and fixes

- run as dedicated user instead of root
- avoid running sed on a already existing config.yaml
- fix typo in sed command for db line
This commit is contained in:
dek 2018-11-03 01:50:30 +01:00
parent 2736a1f47f
commit 8c58048169
2 changed files with 17 additions and 16 deletions

View file

@ -8,9 +8,12 @@ RUN apk add --no-cache \
py3-attrs \
py3-bcrypt \
py3-cffi \
ca-certificates \
&& pip3 install -r requirements.txt
ca-certificates &&\
pip3 install -r requirements.txt &&\
mkdir -p /data /var/log/maubot &&\
adduser -D maubot &&\
chown -R maubot: /opt/maubot /data /var/log/maubot
VOLUME /data
USER maubot
CMD ["/opt/maubot/docker-run.sh"]