-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (36 loc) · 1.36 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
FROM debian:jessie
MAINTAINER Jookies LTD <[email protected]>
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r jasmin && useradd -r -g jasmin jasmin
ENV JASMIN_VERSION 0.9.31
COPY jasmin-0.9.31.tar.gz /tmp/
# Install requirements
RUN apt-get update && apt-get install -y \
python2.7 \
python-pip \
python-dev \
libffi-dev \
libssl-dev \
rabbitmq-server \
redis-server \
supervisor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Jasmin SMS gateway
RUN mkdir -p /etc/jasmin/resource \
/etc/jasmin/store \
/var/log/jasmin \
&& chown jasmin:jasmin /etc/jasmin/store \
/var/log/jasmin \
&& pip install ./tmp/jasmin-0.9.31.tar.gz
# Change binding host for jcli
RUN sed -i '/\[jcli\]/a bind=0.0.0.0' /etc/jasmin/jasmin.cfg
EXPOSE 2775 8990 1401
VOLUME ["/var/log/jasmin", "/etc/jasmin", "/etc/jasmin/store"]
COPY docker-entrypoint.sh /
RUN ["chmod", "+x", "/docker-entrypoint.sh"]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["jasmind.py", "--enable-interceptor-client", "--enable-dlr-thrower", "--enable-dlr-lookup", "-u", "jcliadmin", "-p", "jclipwd"]
# Notes:
# - jasmind is started with native dlr-thrower and dlr-lookup threads instead of standalone processes
# - restapi (0.9rc16+) is not started in this docker configuration