FROM debian:stable-slim as builder ARG PHP_VERSION=8.1 ARG NODE_VERSION=18 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y git curl ca-certificates WORKDIR omeka RUN git clone --depth 1 --recursive https://github.com/omeka/omeka-s.git RUN chmod 775 omeka-s WORKDIR /omeka/omeka-s SHELL ["/bin/bash", "-c"] RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash ## Install Older version RUN apt-get -y install lsb-release ca-certificates curl RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' RUN apt-get update && \ apt-get -qy install \ php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-curl php${PHP_VERSION}-gd php${PHP_VERSION}-mbstring php${PHP_VERSION}-xml php${PHP_VERSION}-xmlrpc php${PHP_VERSION}-soap php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-imagick\ ghostscript git wget sudo curl openssl imagemagick\ poppler-utils && \ apt-get clean RUN cp /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm RUN export NVM_DIR="$HOME/.nvm" \ && \. "$NVM_DIR/nvm.sh" \ && nvm install stable \ && npm install \ && npx gulp init # Composer PHP RUN apt-get install -qy wget php${PHP_VERSION}-cli php${PHP_VERSION}-zip unzip && \ wget -O /tmp/composer-setup.php https://getcomposer.org/installer && \ php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ composer self-update # Install modules Nov 2020 RUN apt-get -qy install wget unzip # oai pmh module RUN wget https://github.com/Daniel-KM/Omeka-S-module-OaiPmhRepository/releases/download/3.4.7/OaiPmhRepository-3.4.7.zip -O /tmp/oaipmh.zip RUN unzip /tmp/oaipmh.zip -d modules/ # import from omeka 2 RUN wget https://github.com/omeka-s-modules/Omeka2Importer/releases/download/v1.5.1/Omeka2Importer-1.5.1.zip -O /tmp/importer.zip RUN unzip /tmp/importer.zip -d modules/ # bulk edition RUN wget https://github.com/Daniel-KM/Omeka-S-module-BulkEdit/releases/download/3.4.27/BulkEdit-3.4.27.zip -O /tmp/bulkedit.zip RUN unzip /tmp/bulkedit.zip -d modules/ # Easy Admin RUN wget https://github.com/Daniel-KM/Omeka-S-module-EasyAdmin/releases/download/3.4.18/EasyAdmin-3.4.18.zip -O /tmp/EasyAdmin.zip RUN unzip /tmp/EasyAdmin.zip -d modules/ # custom vocab RUN wget https://github.com/omeka-s-modules/CustomVocab/releases/download/v2.0.2/CustomVocab-2.0.2.zip -O /tmp/customvocab.zip RUN unzip /tmp/customvocab.zip -d modules/ # Advanced Search ## Require php 8.. ## RUN git clone https://github.com/Daniel-KM/Omeka-S-module-AdvancedSearch.git modules/AdvancedSearch ## RUN cd modules/AdvancedSearch && composer update && composer install --no-dev && cd - RUN wget https://github.com/Daniel-KM/Omeka-S-module-AdvancedSearch/releases/download/3.4.6.20/AdvancedSearch-3.4.6.20.zip -O /tmp/AdvancedSearch.zip RUN unzip /tmp/AdvancedSearch.zip -d modules/ RUN wget https://github.com/omeka-s-modules/MetadataBrowse/releases/download/v1.6.0/MetadataBrowse-1.6.0.zip -O /tmp/MetadataBrowse.zip RUN unzip /tmp/MetadataBrowse.zip -d modules/ RUN wget https://github.com/omeka-s-modules/Mapping/releases/download/v1.10.0/Mapping-1.10.0.zip -O /tmp/Mapping.zip RUN unzip /tmp/Mapping.zip -d modules/ # SiteSlug as Domain RUN git clone https://github.com/kyfr59/omeka-s-module-SiteSlugAsSubdomain.git modules/SiteSlugAsSubdomain # ValueSuggest RUN git clone https://github.com/omeka-s-modules/ValueSuggest.git modules/ValueSuggest # Rights Statements RUN git clone https://github.com/zerocrates/RightsStatements.git modules/RightsStatements # Mapping #RUN git clone https://github.com/omeka-s-modules/Mapping.git modules/Mapping # CSS Editor RUN git clone https://github.com/omeka-s-modules/CSSEditor.git modules/CSSEditor # extract pdf content to text field RUN git clone https://github.com/omeka-s-modules/ExtractText.git modules/ExtractText # metadata links #RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-MetadataBrowse.git modules/MetadataBrowse # Comments RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Comment.git modules/Comment # Blocks Disposition / Generic / Folksonomy RUN git clone https://github.com/Daniel-KM/Omeka-S-module-BlocksDisposition.git modules/BlocksDisposition RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Generic.git modules/Generic RUN git clone https://github.com/Daniel-KM/Omeka-S-module-Folksonomy.git modules/Folksonomy RUN git clone https://github.com/omeka-s-modules/FileSideload.git modules/FileSideload #RUN git clone https://github.com/Daniel-KM/Omeka-S-module-DataTypeRdf.git modules/DataTypeRdf RUN wget https://github.com/Daniel-KM/Omeka-s-module-DataTypeRdf/releases/download/3.4.9/DataTypeRdf-3.4.9.zip -O /tmp/DataTypeRdf.zip RUN unzip /tmp/DataTypeRdf.zip -d modules/ #RUN git clone https://github.com/omeka-s-modules/CSVImport.git modules/CSVImport RUN git clone https://github.com/Daniel-KM/Omeka-S-module-Common.git modules/Common RUN wget https://github.com/omeka-s-modules/CSVImport/releases/download/v2.6.1/CSVImport-2.6.1.zip -O /tmp/CSVImport.zip RUN unzip /tmp/CSVImport.zip -d modules/ RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-DerivativeMedia.git modules/DerivativeMedia RUN wget https://github.com/Daniel-KM/Omeka-s-module-AdvancedResourceTemplate/releases/download/3.4.31/AdvancedResourceTemplate-3.4.31.zip -O /tmp/AdvancedResourceTemplate.zip RUN unzip /tmp/AdvancedResourceTemplate.zip -d modules/ RUN wget https://github.com/Daniel-KM/Omeka-s-module-BlockPlus/releases/download/3.4.22-alpha/BlockPlus-3.4.22-alpha.zip -O /tmp/BlockPlus.zip RUN unzip /tmp/BlockPlus.zip -d modules/ RUN wget https://github.com/omeka-s-modules/NumericDataTypes/releases/download/v1.11.3/NumericDataTypes-1.11.3.zip -O /tmp/NumericDataTypes.zip RUN unzip /tmp/NumericDataTypes.zip -d modules/ # TODO: bulk check - https://gitlab.com/Daniel-KM/Omeka-S-module-BulkCheck - depend Logs & Generic #RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-BulkCheck.git modules/BulkCheck #RUN git clone https://gitlab.com/Daniel-KM/Omeka-S-module-Log.git modules/Log # REPLACED by Easy Admin #RUN git clone https://github.com/Daniel-KM/Omeka-S-module-EasyAdmin/releases/download/3.4.16/EasyAdmin-3.4.16.zip modules/EasyAdmin RUN rm -rf /tmp/*.zip ### < END BUILDER > ### FROM debian:stable-slim ARG PHP_VERSION=8.1 # Install dependencies ENV DEBIAN_FRONTEND noninteractive ## Install Older version RUN apt-get update && \ apt-get -y install lsb-release ca-certificates curl RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' RUN apt-get update && \ apt-get -qy install \ php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-curl php${PHP_VERSION}-gd php${PHP_VERSION}-mbstring php${PHP_VERSION}-xml php${PHP_VERSION}-xmlrpc php${PHP_VERSION}-soap php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-imagick\ ghostscript git wget sudo curl openssl imagemagick\ poppler-utils && \ apt-get clean RUN update-alternatives --install /usr/bin/php php /usr/bin/php${PHP_VERSION} 99 --force RUN update-alternatives --set php /usr/bin/php${PHP_VERSION} RUN cp /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm RUN apt install -y \ apache2 apache2-utils libapache2-mod-php${PHP_VERSION} COPY ./envvars /etc/apache2/envvars COPY ./omeka.apache2.conf /etc/apache2/sites-available/000-default.conf RUN a2enmod rewrite alias authz_user ssl headers RUN useradd omeka -d /var/www/html/ && \ adduser omeka www-data && \ adduser omeka users RUN chown -R omeka:users /var/log/apache2 RUN chmod -R 777 /var/lib/php/sessions #COPY omeka.conf /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf # #RUN mkdir -p /run/php/ #RUN mkdir -p logs # Extract Text RUN apt-get -qy install catdoc docx2txt lynx odt2txt poppler-utils # Install for derivatives RUN apt-get -qy install ffmpeg ghostscript # Install omeka COPY --from=builder /omeka/omeka-s /var/www/html/omeka-s RUN chown -R omeka:omeka /var/www/html/omeka-s WORKDIR /var/www/html/omeka-s USER root # Install NGINX #RUN apt-get update && \ # apt-get -qy install nginx-full ssl-cert && \ # apt-get clean # #COPY nginx.conf /etc/nginx/nginx.conf # ## Basic nginx directories #RUN mkdir -p /var/lib/nginx/body && \ # mkdir -p /var/lib/nginx/proxy && \ # mkdir -p /var/lib/nginx/fastcgi && \ # mkdir -p /var/lib/nginx/scgi && \ # mkdir -p /var/lib/nginx/uwsgi # ## Logging to stdout #RUN ln -sf /proc/self/fd /dev/ #RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log # ## PID nginx for non-root users #RUN mkdir -p /run/nginx && \ # chmod 777 /run/nginx && \ # chmod -R 777 /var/lib/nginx # ## Use port 8080 #RUN sed -i 's/80/8080/g' /etc/nginx/sites-enabled/default #RUN apt-get purge -qy nodejs git curl wget openssl #RUN apt-get -qy clean COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh EXPOSE 80 VOLUME /var/www/html/omeka-s/files ENTRYPOINT ["/bin/bash","/usr/local/bin/docker-entrypoint.sh"] #CMD ["/usr/sbin/php-fpm","--nodaemonize"]] CMD ["apachectl","-D","FOREGROUND"]