forked from roramirez/qpanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (50 loc) · 1.48 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
#
# This file for Docker is thanks by @litnimax
# Is adapted to use Python 3 (The support for Python 2 was removed)
# You can find about this in https://github.com/roramirez/qpanel/issues/195
# If have any improved about this add a Pull Request o Issue.
#
# Maybe using a docker-compose would be fine in the future. Only add this in QPanel for
# for all dockerized users around the all shipping containers in the world.
#
# Chile in state of emergency, October 2019
FROM alpine:3.8
RUN apk add --ino-cache \
git \
py3-pip \
npm \
py3-babel \
tini \
swig \
gcc \
alpine-sdk \
python3-dev \
mariadb-dev && \
cd / && \
git clone \
-b master \
--depth=1 \
https://github.com/d-sergienko/qpanel.git && \
cd qpanel && \
pip3 install -r requirements.txt && \
pip3 install -r requirements/dbs/mysql.txt && \
cd /qpanel && \
npm install && \
cd /qpanel && \
pybabel compile -d qpanel/translations && \
cd /qpanel && \
apk del --quiet \
git \
npm \
gcc \
alpine-sdk \
python-dev
WORKDIR /qpanel
EXPOSE 5000
CMD [ ! -z "${QPANEL_USER}" ] && \
[ ! -z "${QPANEL_PWD}" ] && \
[ ! -z "${ASTERISK_HOST}" ] && \
sed \
-e "s/user = username/user = ${QPANEL_USER}/;s/password = password/password = ${QPANEL_PWD}/;s/host = localhost/host = ${ASTERISK_HOST}/" \
-i config.ini; \
tini -- python3 app.py