Dockerfile 2.8 KB

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