-
Notifications
You must be signed in to change notification settings - Fork 243
/
Dockerfile
44 lines (32 loc) · 1.08 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
FROM ubuntu:14.04
MAINTAINER Joao Ricardo "joaoricardo000@gmail.com"
RUN apt-get update && apt-get upgrade -y
# Dependencies
RUN apt-get install -y python2.7 python-dev python-pip python-virtualenv &&\
apt-get install -y libfontconfig libjpeg-dev zlib1g-dev &&\
apt-get install -y git curl supervisor espeak
# Node installation to use pageres
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - &&\
apt-get install -y nodejs
RUN npm -g install pageres-cli
# Copying files
COPY src/ /whatsapp-bot
COPY opt/requirements.pip /requirements.pip
COPY opt/supervisor.conf /etc/supervisor/conf.d
COPY opt/patch.sh /patch.sh
# Create virtualenv with requirements
RUN virtualenv venv && /./venv/bin/pip install -r requirements.pip
# Apply patches
RUN chmod +x /patch.sh
RUN /./patch.sh
EXPOSE 9005
############## EDIT
# Whatsapp Credentials:
ENV WHATSAPP_LOGIN="5544999999999"
ENV WHATSAPP_PW="xxxxxxxxxxxxxxxxxxxxxxxx="
# Bing API KEY for image search
ENV BING_API_KEY=""
# Add a cellphone number to set as admin
ENV WHATSAPP_ADMIN=""
############## /EDIT
CMD ["/usr/bin/supervisord"]