Dockerfile.py3 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. redis==2.10.6 \
  49. # Avoid Django 3 pulling
  50. django_redis==4.11.0 \
  51. flower \
  52. pyhive \
  53. ksql \
  54. pydruid \
  55. pybigquery \
  56. pyasn1==0.4.1 \
  57. gevent \
  58. eventlet \
  59. threadloop # Needed for Jaeger \
  60. thrift-sasl==0.2.1
  61. COPY tools/docker/hue/conf3 desktop/conf
  62. COPY tools/docker/hue/startup.sh .
  63. USER hue
  64. EXPOSE 8888
  65. CMD ["./startup.sh"]