Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM huelb_httpd:2.4
  2. LABEL description="Hue Project https://github.com/cloudera/hue"
  3. ARG GBN
  4. ARG GSHA
  5. ARG GBRANCH
  6. ARG VERSION
  7. ARG HUEUSER
  8. # Set the environment variable
  9. ENV NAME="hue" \
  10. HUE_USER=${HUEUSER} \
  11. HUE_HOME="/opt/${HUEUSER}" \
  12. HUE_CONF_DIR="${HUE_CONF}/conf" \
  13. HUE_LOG_DIR="/var/log/${HUEUSER}" \
  14. HUE_BUILDNO=${GBN} \
  15. HUE_SHAURL=${GSHA} \
  16. HUE_BRANCHURL=${GBRANCH} \
  17. HUE_VERSION=${VERSION} \
  18. HUE_BIN="/opt/${HUEUSER}/build/env/bin" \
  19. PATH=$PATH:${HUE_BIN} \
  20. SUPERVISOR_VERSION=4.0.2
  21. # create hue user
  22. RUN groupadd -g 1123 ${HUEUSER} && useradd -g 1123 -d ${HUE_HOME} -s /bin/bash -u 1123 ${HUEUSER}
  23. RUN mkdir -p ${HUE_LOG_DIR} && chown -R ${HUEUSER}:${HUEUSER} ${HUE_LOG_DIR}
  24. RUN echo "Include /etc/httpd/conf.d/hue_httpd.conf" >> /etc/httpd/conf/httpd.conf
  25. COPY static ${HUE_HOME}/build/static
  26. COPY hue_httpd.conf /etc/httpd/conf.d/hue_httpd.conf
  27. COPY hue.conf /etc/httpd/conf.d/hue.conf
  28. COPY run_httpd.sh ${HUE_HOME}
  29. RUN chown -R ${HUEUSER}:${HUEUSER} ${HUE_HOME}/build/static \
  30. /etc/httpd/conf.d/hue* \
  31. ${HUE_HOME}/run_httpd.sh && chmod -v +x ${HUE_HOME}/run_httpd.sh
  32. EXPOSE 80
  33. # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
  34. STOPSIGNAL SIGINT
  35. WORKDIR ${HUE_HOME}
  36. CMD ["run_httpd.sh"]