Нет описания

Dockerfile 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # IRIS Source Code
  2. # Copyright (C) 2021 - Airbus CyberSecurity (SAS)
  3. # ir@cyberactionlab.net
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU Lesser General Public
  7. # License as published by the Free Software Foundation; either
  8. # version 3 of the License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. # Lesser General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Lesser General Public License
  16. # along with this program; if not, write to the Free Software Foundation,
  17. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. FROM nginx:1.27
  19. RUN apt-get update && apt-get install -y curl
  20. # Used to pass protected files to the container through volumes
  21. ARG NGINX_CONF_GID
  22. ARG NGINX_CONF_FILE
  23. RUN groupadd -g ${NGINX_CONF_GID} az-app-nginx-conf && usermod -a -G az-app-nginx-conf www-data
  24. COPY entrypoint.sh /entrypoint.sh
  25. RUN chmod 700 /entrypoint.sh
  26. RUN chown www-data:www-data /entrypoint.sh
  27. COPY ${NGINX_CONF_FILE} /etc/nginx/nginx.conf
  28. # log
  29. RUN touch /var/log/nginx/audit_platform_error.log && chown -R www-data:www-data /var/log/nginx/audit_platform_error.log
  30. RUN touch /var/log/nginx/audit_platform_access.log && chown -R www-data:www-data /var/log/nginx/audit_platform_access.log
  31. # Security
  32. RUN touch /var/run/nginx.pid && chown -R www-data:www-data /var/run/nginx.pid /var/cache/nginx /etc/nginx/nginx.conf
  33. RUN mkdir -p /www/certs/
  34. USER www-data
  35. HEALTHCHECK --interval=5s --timeout=3s CMD curl --fail -k https://127.0.0.1:${INTERFACE_HTTPS_PORT:-443} || exit 1
  36. ENTRYPOINT ["/entrypoint.sh"]