1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00

add superset

This commit is contained in:
kev 2018-07-28 08:45:54 +08:00
parent 8f8dd2db4c
commit 9fe5e7a3b5
7 changed files with 179 additions and 0 deletions

@ -285,6 +285,7 @@ A collection of delicious docker recipes.
- [ ] hub
- [ ] node-firefox
- [x] standalone-firefox
- [x] amancevice/superset
- [x] v2ray/official :cn:
- [x] centurylink/watchtower
- [x] wekanteam/wekan

75
superset/Dockerfile Normal file

@ -0,0 +1,75 @@
#
# Dockerfile for superset-arm
#
FROM resin/rpi-raspbian:stretch
MAINTAINER EasyPi Software Foundation
# Superset version
ARG SUPERSET_VERSION=0.26.3
# Configure environment
ENV 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
# 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 \
libssl-dev \
python3-dev && \
apt-get clean && \
rm -r /var/lib/apt/lists/* && \
curl https://raw.githubusercontent.com/${SUPERSET_REPO}/${SUPERSET_VERSION}/requirements.txt -o requirements.txt && \
curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 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==0.9.8 \
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.3.post0 \
sqlalchemy-redshift==0.5.0 \
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", "-w", "2", "--timeout", "60", "-b", "0.0.0.0:8088", "--limit-request-line", "0", "--limit-request-field_size", "0", "superset:app"]
USER superset

2
superset/README.md Normal file

@ -0,0 +1,2 @@
superset
========

75
superset/arm/Dockerfile Normal file

@ -0,0 +1,75 @@
#
# Dockerfile for superset-arm
#
FROM resin/rpi-raspbian:stretch
MAINTAINER EasyPi Software Foundation
# Superset version
ARG SUPERSET_VERSION=0.26.3
# Configure environment
ENV 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
# 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 \
libssl-dev \
python3-dev \
python3-pip && \
apt-get clean && \
rm -r /var/lib/apt/lists/* && \
curl https://raw.githubusercontent.com/${SUPERSET_REPO}/${SUPERSET_VERSION}/requirements.txt -o requirements.txt && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 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==0.9.8 \
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.3.post0 \
sqlalchemy-redshift==0.5.0 \
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", "-w", "2", "--timeout", "60", "-b", "0.0.0.0:8088", "--limit-request-line", "0", "--limit-request-field_size", "0", "superset:app"]
USER superset

@ -0,0 +1,7 @@
#!/bin/bash
# Initialize Superset
superset-init
# Load some data to play with
superset load_examples

@ -0,0 +1,12 @@
#!/bin/bash
set -e
# Create an admin user
fabmanager create-admin --app superset $@
# Initialize the database
superset db upgrade
# Create default roles and permissions
superset init

@ -0,0 +1,7 @@
superset:
image: amancevice/superset
ports:
- "8088:8088"
volumes:
- ./data:/var/lib/superset
restart: always