This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Dockerfile
64 lines (52 loc) · 1.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Errbot - the pluggable chatbot
FROM debian:stable-slim
MAINTAINER Rafael Römhild <rafael@roemhild.de>
ENV ERR_USER err
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /app/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Set default locale for the environment
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Add err user and group
RUN groupadd -r $ERR_USER \
&& useradd -r \
-g $ERR_USER \
-d /srv \
-s /bin/bash \
$ERR_USER
# Install packages and perform cleanup
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git \
qalc \
locales \
dnsutils \
libssl-dev \
build-essential \
python3-dnspython \
python3-dev \
python3-openssl \
python3-pip \
python3-cffi \
python3-pyasn1 \
python3-geoip \
python3-lxml \
&& locale-gen C.UTF-8 \
&& /usr/sbin/update-locale LANG=C.UTF-8 \
&& echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \
&& locale-gen \
&& pip3 install virtualenv \
&& pip3 install -U setuptools \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/archives
RUN mkdir /app
COPY requirements.txt /app/requirements.txt
RUN virtualenv /app/venv
RUN . /app/venv/bin/activate; pip install --no-cache-dir -r /app/requirements.txt
COPY config.py /app/config.py
COPY run.sh /app/venv/bin/run.sh
RUN mkdir /srv/data /srv/plugins /srv/errbackends && chown -R $ERR_USER: /srv /app
EXPOSE 3141 3142
VOLUME ["/srv"]
ENTRYPOINT ["/app/venv/bin/run.sh"]