Dockerfile.py3 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. git+https://github.com/gethue/PyHive \
  53. gevent \
  54. eventlet \
  55. threadloop # Needed for Jaeger \
  56. thrift-sasl==0.2.1
  57. COPY tools/docker/hue/conf3 desktop/conf
  58. COPY tools/docker/hue/startup.sh .
  59. USER hue
  60. EXPOSE 8888
  61. CMD ["./startup.sh"]