Dockerfile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # syntax = edrevo/dockerfile-plus
  2. ARG VERSION="3.18"
  3. FROM alpine:${VERSION} AS librex
  4. WORKDIR "/var/www/html"
  5. # Docker metadata contains information about the maintainer, such as the name, repository, and support email
  6. # Please add any necessary information or correct any incorrect information
  7. # See more: https://docs.docker.com/config/labels-custom-metadata/
  8. LABEL name="LibreX" \
  9. description="Framework and javascript free privacy respecting meta search engine" \
  10. version="1.0" \
  11. vendor="Hnhx Femboy<femboy.hu>" \
  12. maintainer="Hnhx Femboy<femboy.hu>, Junior L. Botelho<juniorbotelho.com.br>" \
  13. url="https://github.com/hnhx/librex" \
  14. usage="https://github.com/hnhx/librex/wiki" \
  15. authors="https://github.com/hnhx/librex/contributors"
  16. # Include arguments as temporary environment variables to be handled by Docker during the image build process
  17. # Change or add new arguments to customize the image generated by 'docker build' command
  18. ARG DOCKER_SCRIPTS="docker"
  19. ARG NGINX_PORT=8080
  20. # Customize the environment during both execution and build time by modifying the environment variables added to the container's shell
  21. # When building your image, make sure to set the 'TZ' environment variable to your desired time zone location, for example 'America/Sao_Paulo'
  22. # See more: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
  23. ENV TZ="America/New_York"
  24. RUN apk add gettext --no-cache
  25. # The following lines import all Dockerfiles from other folders so that they can be built together in the final build
  26. INCLUDE+ docker/php/php.dockerfile
  27. INCLUDE+ docker/server/nginx.dockerfile
  28. # Include docker scripts, docker images, and the 'GNU License' in the Librex container
  29. ADD "." "/var/www/html"
  30. # Set permissions for script files as executable scripts inside 'docker/scripts' directory
  31. RUN chmod u+x "${DOCKER_SCRIPTS}/php/prepare.sh" &&\
  32. chmod u+x "${DOCKER_SCRIPTS}/server/prepare.sh" &&\
  33. chmod u+x "${DOCKER_SCRIPTS}/entrypoint.sh" &&\
  34. chmod u+x "${DOCKER_SCRIPTS}/attributes.sh"
  35. EXPOSE ${NGINX_PORT}
  36. # Configures the container to be run as an executable.
  37. ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"]