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.26/BulkEdit-3.4.26.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.16/EasyAdmin-3.4.16.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 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 # 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 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 # Extract Text RUN apt-get -qy install catdoc docx2txt lynx odt2txt poppler-utils # 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 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 ["apachectl","-D","FOREGROUND"]