Dockerfile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. apt-get install -y curl && \
  29. curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
  30. apt-get install -y nodejs && \
  31. addgroup hue && \
  32. useradd -r -u 1001 -g hue hue && \
  33. chown -R hue /hue && \
  34. mkdir /hue/build && \
  35. chown -R hue /hue/build && \
  36. mkdir /usr/share/hue && \
  37. chown -R hue /usr/share/hue && \
  38. rm -rf /hue/desktop/conf && \
  39. cp -r /hue/desktop/conf.dist /hue/desktop/conf && \
  40. mkdir -m 755 /var/log/hue && \
  41. cd /hue && \
  42. ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3.8 && \
  43. ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3 && \
  44. PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \
  45. PREFIX=/usr/share ROOT=/usr/share/hue PYTHON_VER=python3.8 ROOT=/hue \
  46. SYS_PYTHON=/usr/bin/python3.8 SYS_PIP=/usr/local/bin/pip3.8 make apps install && \
  47. chown -R hue /usr/share/hue && \
  48. npm cache clean --force && \
  49. pip cache purge && \
  50. rm -rf /var/lib/apt/lists/* && \
  51. cp -r /hue/tools/docker/hue/conf3/* /usr/share/hue/desktop/conf/ && \
  52. cp /hue/tools/docker/hue/startup.sh /usr/share/hue/startup.sh && \
  53. mkdir -p /usr/share/hue/tools/slack && \
  54. cp /hue/tools/slack/manifest.yml /usr/share/hue/tools/slack/manifest.yml && \
  55. rm -rf /hue && \
  56. rm -rf /usr/share/hue/node_modules
  57. WORKDIR /usr/share/hue
  58. # Install DB connectors
  59. # To move to requirements_connectors.txt
  60. RUN ./build/env/bin/pip install --no-cache-dir \
  61. psycopg2-binary \
  62. # Avoid Django 3 pulling \
  63. django_redis==4.11.0 \
  64. flower==0.9.7 \
  65. # Contains fix for SparkSql show tables \
  66. git+https://github.com/gethue/PyHive \
  67. #ksql \
  68. git+https://github.com/bryanyang0528/ksql-python \
  69. pydruid \
  70. # pybigquery \
  71. elasticsearch-dbapi \
  72. pyasn1==0.4.1 \
  73. # View some parquet files \
  74. python-snappy==0.5.4 \
  75. # Needed for Jaeger \
  76. threadloop \
  77. # Fix Can't load plugin: sqlalchemy.dialects:clickhouse \
  78. sqlalchemy-clickhouse \
  79. # sqlalchemy-clickhouse depend on infi.clickhouse_orm \
  80. # install after sqlalchemy-clickhouse and version == 1.0.4 \
  81. # otherwise Code: 516, Authentication failed will display \
  82. infi.clickhouse_orm==1.0.4 \
  83. mysqlclient==2.1.1 \
  84. PyAthena==2.25.2
  85. # PyAthena == 3.x.x is latest, but not working with current configuration \
  86. # otherwise, 'VisitableType' object is not subscriptable in Hue UI
  87. USER hue
  88. EXPOSE 8888
  89. CMD ["./startup.sh"]