Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_CONF="/etc/hue" \
  12. HUE_HOME="/opt/${HUEUSER}" \
  13. HUE_CONF_DIR="${HUE_CONF}/conf" \
  14. HUE_LOG_DIR="/var/log/${HUEUSER}" \
  15. HUE_BUILDNO=${GBN} \
  16. HUE_SHAURL=${GSHA} \
  17. HUE_BRANCHURL=${GBRANCH} \
  18. HUE_VERSION=${VERSION} \
  19. HUE_BIN="/opt/${HUEUSER}/build/env/bin" \
  20. PATH=$PATH:${HUE_BIN} \
  21. SUPERVISOR_VERSION=4.0.2
  22. # create hue user
  23. RUN groupadd -g 1123 ${HUE_USER} && useradd -g 1123 -d ${HUE_HOME} -s /bin/bash -u 1123 ${HUE_USER}
  24. RUN mkdir -p ${HUE_LOG_DIR} && chown -R ${HUE_USER}:${HUE_USER} ${HUE_LOG_DIR}
  25. RUN echo "Include /etc/httpd/conf.d/hue_httpd.conf" >> /etc/httpd/conf/httpd.conf
  26. COPY --chown=${HUE_USER}:${HUE_USER} static ${HUE_HOME}/build/static
  27. COPY --chown=${HUE_USER}:${HUE_USER} hue_httpd.conf /etc/httpd/conf.d/hue_httpd.conf
  28. COPY --chown=${HUE_USER}:${HUE_USER} hue.conf /etc/httpd/conf.d/hue.conf
  29. COPY --chown=${HUE_USER}:${HUE_USER} run_httpd.sh ${HUE_HOME}
  30. RUN chmod -v +x ${HUE_HOME}/run_httpd.sh
  31. EXPOSE 80
  32. # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
  33. STOPSIGNAL SIGINT
  34. WORKDIR ${HUE_HOME}
  35. CMD ["run_httpd.sh"]