Dockerfile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Welcome to Hue (http://gethue.com) Dockerfile
  2. FROM ubuntu:20.04
  3. LABEL description="Hue SQL Assistant - gethue.com"
  4. ENV DEBIAN_FRONTEND=noninteractive
  5. RUN apt-get update -y && apt-get install -y \
  6. python3-pip \
  7. libkrb5-dev \
  8. libsasl2-modules-gssapi-mit \
  9. libsasl2-dev \
  10. libkrb5-dev \
  11. krb5-config \
  12. krb5-user \
  13. libxml2-dev \
  14. libxslt-dev \
  15. libmysqlclient-dev \
  16. libldap2-dev \
  17. libsnappy-dev \
  18. python3.8-venv \
  19. python3.8-dev \
  20. python3.8-distutils \
  21. rsync \
  22. curl \
  23. sudo \
  24. git && \
  25. rm -rf /var/lib/apt/lists/*
  26. ADD . /hue
  27. RUN pip3 install --upgrade --no-cache-dir setuptools virtualenv pip && \
  28. curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && \
  29. apt-get install -y nodejs && \
  30. addgroup hue && \
  31. useradd -r -u 1001 -g hue hue && \
  32. chown -R hue /hue && \
  33. mkdir /hue/build && \
  34. chown -R hue /hue/build && \
  35. mkdir /usr/share/hue && \
  36. chown -R hue /usr/share/hue && \
  37. rm -r /hue/desktop/conf/* && \
  38. cp -r /hue/desktop/conf.dist/* /hue/desktop/conf/ && \
  39. cd /hue && \
  40. PREFIX=/usr/share ROOT=/usr/share/hue PYTHON_VER=python3.8 make install && \
  41. chown -R hue /usr/share/hue && \
  42. npm cache clean --force && \
  43. pip cache purge && \
  44. rm -rf /var/lib/apt/lists/* && \
  45. cp -r /hue/tools/docker/hue/conf3/* /usr/share/hue/desktop/conf/ && \
  46. cp /hue/tools/docker/hue/startup.sh /usr/share/hue/startup.sh && \
  47. mkdir -p /usr/share/hue/tools/slack && \
  48. cp /hue/tools/slack/manifest.yml /usr/share/hue/tools/slack/manifest.yml && \
  49. rm -rf /hue && \
  50. rm -rf /usr/share/hue/node_modules
  51. WORKDIR /usr/share/hue
  52. # Install DB connectors
  53. # To move to requirements_connectors.txt
  54. RUN ./build/env/bin/pip install --no-cache-dir \
  55. psycopg2-binary \
  56. # Avoid Django 3 pulling
  57. django_redis==4.11.0 \
  58. flower==0.9.7 \
  59. # Contains fix for SparkSql show tables
  60. git+https://github.com/gethue/PyHive \
  61. # pyhive \
  62. impyla==0.17.0 \
  63. #ksql \
  64. git+https://github.com/bryanyang0528/ksql-python \
  65. pydruid \
  66. pybigquery \
  67. elasticsearch-dbapi \
  68. pyasn1==0.4.1 \
  69. # View some parquet files
  70. python-snappy==0.5.4 \
  71. # Needed for Jaeger
  72. threadloop \
  73. # Fix Can't load plugin: sqlalchemy.dialects:clickhouse
  74. sqlalchemy-clickhouse \
  75. # sqlalchemy-clickhouse depend on infi.clickhouse_orm
  76. # install after sqlalchemy-clickhouse and version == 1.0.4
  77. # otherwise Code: 516, Authentication failed will display
  78. infi.clickhouse_orm==1.0.4
  79. USER hue
  80. EXPOSE 8888
  81. CMD ["./startup.sh"]