-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
74 lines (69 loc) · 2.29 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
65
66
67
68
69
70
71
72
73
74
FROM python:3.6
# Superset version
ARG SUPERSET_VERSION=0.28.1
# Configure environment
ENV GUNICORN_BIND=0.0.0.0:8088 \
GUNICORN_LIMIT_REQUEST_FIELD_SIZE=0 \
GUNICORN_LIMIT_REQUEST_LINE=0 \
GUNICORN_TIMEOUT=60 \
GUNICORN_WORKERS=2 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH \
SUPERSET_REPO=apache/incubator-superset \
SUPERSET_VERSION=${SUPERSET_VERSION} \
SUPERSET_HOME=/var/lib/superset
ENV GUNICORN_CMD_ARGS="--workers ${GUNICORN_WORKERS} --timeout ${GUNICORN_TIMEOUT} --bind ${GUNICORN_BIND} --limit-request-line ${GUNICORN_LIMIT_REQUEST_LINE} --limit-request-field_size ${GUNICORN_LIMIT_REQUEST_FIELD_SIZE}"
# Create superset user & install dependencies
RUN useradd -U -m superset && \
mkdir /etc/superset && \
mkdir ${SUPERSET_HOME} && \
chown -R superset:superset /etc/superset && \
chown -R superset:superset ${SUPERSET_HOME} && \
apt-get update && \
apt-get install -y \
build-essential \
curl \
default-libmysqlclient-dev \
freetds-dev \
freetds-bin \
libffi-dev \
libldap2-dev \
libpq-dev \
libsasl2-dev \
libssl1.0 && \
apt-get clean && \
rm -r /var/lib/apt/lists/* && \
curl https://raw.githubusercontent.com/${SUPERSET_REPO}/${SUPERSET_VERSION}/requirements.txt -o requirements.txt && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir \
Werkzeug==0.12.1 \
flask-cors==3.0.3 \
flask-mail==0.9.1 \
flask-oauth==0.12 \
flask_oauthlib==0.9.3 \
gevent==1.2.2 \
impyla==0.14.0 \
infi.clickhouse-orm==1.0.2 \
mysqlclient==1.3.7 \
psycopg2==2.6.1 \
pyathena==1.2.5 \
pyhive==0.5.1 \
pyldap==2.4.28 \
pymssql==2.1.3 \
redis==2.10.5 \
sqlalchemy-clickhouse==0.1.5.post0 \
sqlalchemy-redshift==0.7.1 \
superset==${SUPERSET_VERSION} && \
rm requirements.txt
# Configure Filesystem
COPY superset /usr/local/bin
VOLUME /home/superset \
/etc/superset \
/var/lib/superset
WORKDIR /home/superset
# Deploy application
EXPOSE 8088
HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"]
CMD ["gunicorn", "superset:app"]
USER superset