/superset/arm/Dockerfile

https://github.com/vimagick/dockerfiles · Dockerfile · 82 lines · 70 code · 5 blank · 7 comment · 12 complexity · 88163b89414d56764c6b91687d478fac MD5 · raw file

  1. #
  2. # Dockerfile for superset-arm
  3. #
  4. FROM arm32v7/debian:buster
  5. MAINTAINER EasyPi Software Foundation
  6. # Configure environment
  7. ENV SUPERSET_VERSION=0.37.0 \
  8. SUPERSET_REPO=apache/incubator-superset \
  9. SUPERSET_HOME=/var/lib/superset \
  10. PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH \
  11. LANG=C.UTF-8 \
  12. LC_ALL=C.UTF-8
  13. ENV GUNICORN_BIND=0.0.0.0:8088 \
  14. GUNICORN_LIMIT_REQUEST_FIELD_SIZE=0 \
  15. GUNICORN_LIMIT_REQUEST_LINE=0 \
  16. GUNICORN_TIMEOUT=60 \
  17. GUNICORN_WORKERS=3 \
  18. GUNICORN_THREADS=4
  19. ENV GUNICORN_CMD_ARGS="--workers ${GUNICORN_WORKERS} --threads ${GUNICORN_THREADS} --timeout ${GUNICORN_TIMEOUT} --bind ${GUNICORN_BIND} --limit-request-line ${GUNICORN_LIMIT_REQUEST_LINE} --limit-request-field_size ${GUNICORN_LIMIT_REQUEST_FIELD_SIZE}"
  20. # Create superset user & install dependencies
  21. RUN set -xe \
  22. && useradd -U -m superset \
  23. && mkdir /etc/superset \
  24. && mkdir ${SUPERSET_HOME} \
  25. && chown -R superset:superset /etc/superset \
  26. && chown -R superset:superset ${SUPERSET_HOME} \
  27. && apt-get update \
  28. && apt-get install -y \
  29. build-essential \
  30. curl \
  31. freetds-bin \
  32. freetds-dev \
  33. libffi-dev \
  34. libffi6 \
  35. libldap-2.4-2 \
  36. libldap2-dev \
  37. libmariadb-dev \
  38. libmariadb-dev-compat \
  39. libmariadb3 \
  40. libpq-dev \
  41. libpq5 \
  42. libsasl2-2 \
  43. libsasl2-dev \
  44. libssl-dev \
  45. libssl1.1 \
  46. python3 \
  47. python3-dev \
  48. && curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 \
  49. && pip3 install --no-cache-dir \
  50. apache-superset==${SUPERSET_VERSION} \
  51. mysqlclient \
  52. psycopg2-binary \
  53. pyhive[hive,presto] \
  54. redis \
  55. && apt-get remove -y \
  56. build-essential \
  57. freetds-dev \
  58. libffi-dev \
  59. libldap2-dev \
  60. libmariadb-dev \
  61. libpq-dev \
  62. libsasl2-dev \
  63. libssl-dev \
  64. python3-dev \
  65. && apt-get clean \
  66. && rm -r /var/lib/apt/lists/*
  67. # Configure Filesystem
  68. COPY superset /usr/local/bin
  69. VOLUME /home/superset \
  70. /etc/superset \
  71. /var/lib/superset
  72. WORKDIR /home/superset
  73. # Finalize application
  74. EXPOSE 8088
  75. HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"]
  76. CMD ["gunicorn", "superset:app"]
  77. USER superset