2023-02-11 18:08:53 -08:00
|
|
|
# syntax = edrevo/dockerfile-plus
|
2023-06-23 06:51:40 -07:00
|
|
|
ARG VERSION="3.18"
|
2023-08-02 07:18:21 -07:00
|
|
|
FROM alpine:${VERSION} AS librey
|
2023-02-12 06:13:58 -08:00
|
|
|
WORKDIR "/var/www/html"
|
2023-02-10 14:33:33 -08:00
|
|
|
|
|
|
|
# Docker metadata contains information about the maintainer, such as the name, repository, and support email
|
|
|
|
# Please add any necessary information or correct any incorrect information
|
|
|
|
# See more: https://docs.docker.com/config/labels-custom-metadata/
|
2023-08-02 07:18:21 -07:00
|
|
|
LABEL name="LibreY" \
|
2023-02-10 14:33:33 -08:00
|
|
|
description="Framework and javascript free privacy respecting meta search engine" \
|
|
|
|
version="1.0" \
|
2023-08-02 07:18:21 -07:00
|
|
|
vendor="Ahwx <ahwx.org>" \
|
|
|
|
maintainer="Ahwx <ahwx.org>" \
|
|
|
|
url="https://github.com/Ahwxorg/LibreY" \
|
|
|
|
authors="https://github.com/Ahwxorg/LibreY/contributors"
|
2023-02-10 14:33:33 -08:00
|
|
|
|
|
|
|
# Include arguments as temporary environment variables to be handled by Docker during the image build process
|
|
|
|
# Change or add new arguments to customize the image generated by 'docker build' command
|
2023-02-11 14:18:04 -08:00
|
|
|
ARG DOCKER_SCRIPTS="docker"
|
2023-02-12 07:50:41 -08:00
|
|
|
ARG NGINX_PORT=8080
|
2023-02-10 14:33:33 -08:00
|
|
|
|
|
|
|
# Customize the environment during both execution and build time by modifying the environment variables added to the container's shell
|
|
|
|
# When building your image, make sure to set the 'TZ' environment variable to your desired time zone location, for example 'America/Sao_Paulo'
|
|
|
|
# See more: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
|
|
|
ENV TZ="America/New_York"
|
2023-02-10 18:25:41 -08:00
|
|
|
|
2023-03-17 07:13:21 -07:00
|
|
|
RUN apk add gettext --no-cache
|
|
|
|
|
|
|
|
# The following lines import all Dockerfiles from other folders so that they can be built together in the final build
|
|
|
|
INCLUDE+ docker/php/php.dockerfile
|
|
|
|
INCLUDE+ docker/server/nginx.dockerfile
|
|
|
|
|
2023-08-02 07:18:21 -07:00
|
|
|
# Include docker scripts, docker images, and the 'GNU License' in the LibreY container
|
2023-02-12 06:13:58 -08:00
|
|
|
ADD "." "/var/www/html"
|
2023-02-10 17:29:13 -08:00
|
|
|
|
|
|
|
# Set permissions for script files as executable scripts inside 'docker/scripts' directory
|
2023-02-12 10:04:59 -08:00
|
|
|
RUN chmod u+x "${DOCKER_SCRIPTS}/php/prepare.sh" &&\
|
|
|
|
chmod u+x "${DOCKER_SCRIPTS}/server/prepare.sh" &&\
|
|
|
|
chmod u+x "${DOCKER_SCRIPTS}/entrypoint.sh" &&\
|
|
|
|
chmod u+x "${DOCKER_SCRIPTS}/attributes.sh"
|
2023-02-10 17:29:13 -08:00
|
|
|
|
2023-02-12 07:50:41 -08:00
|
|
|
EXPOSE ${NGINX_PORT}
|
|
|
|
|
2023-02-10 17:29:13 -08:00
|
|
|
# Configures the container to be run as an executable.
|
2023-02-11 18:08:53 -08:00
|
|
|
ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"]
|