Dockerfile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Welcome to Hue (http://gethue.com) Dockerfile
  2. FROM ubuntu:18.04
  3. LABEL description="Hue SQL Assistant - gethue.com"
  4. RUN apt-get update -y && apt-get install -y \
  5. python3-pip \
  6. libkrb5-dev \
  7. libsasl2-modules-gssapi-mit \
  8. libsasl2-dev \
  9. libkrb5-dev \
  10. libxml2-dev \
  11. libxslt-dev \
  12. libmysqlclient-dev \
  13. libldap2-dev \
  14. libsnappy-dev \
  15. python3.6-venv \
  16. rsync \
  17. curl \
  18. sudo \
  19. git
  20. RUN pip3 install --upgrade setuptools
  21. RUN pip3 install virtualenv
  22. # Need recent version for Ubuntu
  23. RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - \
  24. && apt-get install -y nodejs
  25. RUN addgroup hue && useradd -r -u 1001 -g hue hue
  26. ADD . /hue
  27. WORKDIR /hue
  28. RUN chown -R hue /hue \
  29. && mkdir /hue/build \
  30. && chown -R hue /hue/build \
  31. && mkdir /usr/share/hue \
  32. && chown -R hue /usr/share/hue
  33. # Not doing a `make prod`, so manually getting production ini
  34. RUN rm desktop/conf/*
  35. COPY desktop/conf.dist desktop/conf
  36. RUN rm -r desktop/core/ext-py
  37. RUN PREFIX=/usr/share PYTHON_VER=python3.6 make install
  38. RUN chown -R hue /usr/share/hue
  39. # Only keep install dir
  40. # Note: get more minimal image by pulling install dir in a stage 2 image
  41. WORKDIR /usr/share/hue
  42. RUN rm -rf /hue \
  43. && rm -rf node_modules
  44. # Install DB connectors
  45. # To move to requirements_connectors.txt
  46. RUN ./build/env/bin/pip install \
  47. psycopg2-binary \
  48. # Avoid Django 3 pulling
  49. django_redis==4.11.0 \
  50. flower \
  51. # SparkSql show tables
  52. git+https://github.com/gethue/PyHive \
  53. # pyhive \
  54. #ksql \
  55. git+https://github.com/bryanyang0528/ksql-python \
  56. pydruid \
  57. pybigquery \
  58. elasticsearch-dbapi \
  59. pyasn1==0.4.1 \
  60. # View some parquet files
  61. python-snappy==0.5.4 \
  62. threadloop # Needed for Jaeger \
  63. thrift-sasl==0.2.1
  64. COPY tools/docker/hue/conf3 desktop/conf
  65. COPY tools/docker/hue/startup.sh .
  66. USER hue
  67. EXPOSE 8888
  68. CMD ["./startup.sh"]