Dockerfile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Welcome to Hue (http://gethue.com) Dockerfile
  2. # Build an image from a remote github or local cloned Hue repository.
  3. FROM ubuntu:18.04
  4. LABEL description="Hue Project https://github.com/cloudera/hue"
  5. RUN apt-get update -y && apt-get install -y \
  6. build-essential \
  7. libkrb5-dev \
  8. libmysqlclient-dev \
  9. libssl-dev \
  10. libsasl2-dev \
  11. libsasl2-modules-gssapi-mit \
  12. libsqlite3-dev \
  13. libtidy-dev \
  14. libxml2-dev \
  15. libxslt-dev \
  16. libffi-dev \
  17. libldap2-dev \
  18. libpq-dev \
  19. python-dev \
  20. python-setuptools \
  21. libgmp3-dev \
  22. libz-dev \
  23. software-properties-common \
  24. curl \
  25. git \
  26. rsync \
  27. sudo \
  28. maven \
  29. gcc \
  30. swig \
  31. openssl \
  32. xmlsec1 \
  33. libxmlsec1-openssl \
  34. && rm -rf /var/lib/apt/lists/*
  35. ADD . /hue
  36. WORKDIR /hue
  37. # Not doing a `make prod` equivalent, so manually getting production ini
  38. RUN rm desktop/conf/*
  39. COPY desktop/conf.dist desktop/conf
  40. # Need recent version for Ubuntu
  41. RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - \
  42. && apt-get install -y nodejs
  43. RUN PREFIX=/usr/share make install
  44. RUN useradd -ms /bin/bash hue && chown -R hue /usr/share/hue
  45. WORKDIR /usr/share/hue
  46. # Temp fix until npm-install target can use PREFIX in make install
  47. RUN cp /hue/package.json .
  48. RUN cp /hue/webpack.config*.js ./
  49. RUN npm install
  50. RUN npm run webpack
  51. RUN npm run webpack-login
  52. RUN npm run webpack-workers
  53. RUN ./build/env/bin/hue collectstatic --noinput
  54. RUN rm -rf /hue
  55. RUN ./build/env/bin/pip install psycopg2-binary
  56. COPY tools/docker/hue/conf desktop/conf
  57. COPY tools/docker/hue/startup.sh .
  58. EXPOSE 8888
  59. CMD ["./startup.sh"]