FROM alpine:3.18 LABEL Maintainer="TMS " \ Description="Omeka S docker container with NGINX" #ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub # make sure you can use HTTPS RUN apk --update add ca-certificates #RUN echo "https://dl.bintray.com/php-alpine/v3.11/php-7.4" >> /etc/apk/repositories # Install packages RUN apk --no-cache add php82 php82-fpm php82-opcache php82-openssl php82-curl php82-pdo php82-pdo_mysql php82-session \ php82-mbstring php82-fileinfo php82-xml nginx supervisor curl unzip # https://github.com/codecasts/php-alpine/issues/21 #RUN ln -s /usr/bin/php7 /usr/bin/php # Configure nginx COPY config/nginx.conf /etc/nginx/nginx.conf # Remove default server definition # RUN rm /etc/nginx/conf.d/default.conf # Configure PHP-FPM COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf COPY config/php.ini /etc/php82/conf.d/custom.ini # Configure supervisord COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Setup documexnt root RUN mkdir -p /var/www/html ##RUN mkdir -p /var/www/html/omeka-s # Fetch Omeka-S WORKDIR /tmp ADD https://github.com/omeka/omeka-s/releases/download/v4.0.4/omeka-s-4.0.4.zip /tmp RUN unzip omeka-s-4.0.4.zip -d /var/www/html/ && rm omeka-s-4.0.4.zip ##COPY config/database.ini /var/www/html/omeka-s/config/database.ini # Make sure files/folders needed by the processes are accessable when they run under the nobody user RUN chown -R nobody.nobody /var/www/html && \ chown -R nobody.nobody /run && \ chown -R nobody.nobody /var/lib/nginx && \ chown -R nobody.nobody /var/log/nginx && \ chown -R nobody.nobody /var/log/php82 # Change to Omeka-s base dir WORKDIR /var/www/html/omeka-s # Switch to use a non-root user from here on USER nobody # Add application # WORKDIR /var/www/html # COPY --chown=nobody src/ /var/www/html/ # Expose the port nginx is reachable on EXPOSE 8080 # Let supervisord start nginx & php-fpm CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] # Configure a healthcheck to validate that everything is up&running HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping