Omeka_S-docker/omeka-s-docker/Dockerfile

71 lines
2.2 KiB
Docker
Raw Normal View History

FROM alpine:3.18
2023-09-22 20:26:47 +02:00
2023-09-25 13:01:31 +02:00
LABEL Maintainer="TMS <tms@lameops.io>" \
Description="Omeka S docker container with NGINX"
2023-09-22 20:26:47 +02:00
#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
2023-09-22 20:26:47 +02:00
# 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
2023-09-22 20:26:47 +02:00
# Configure PHP-FPM
2023-09-22 22:06:20 +02:00
COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf
COPY config/php.ini /etc/php82/conf.d/custom.ini
2023-09-22 20:26:47 +02:00
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Setup documexnt root
2023-09-22 20:26:47 +02:00
RUN mkdir -p /var/www/html
2023-09-25 13:01:31 +02:00
##RUN mkdir -p /var/www/html/omeka-s
2023-09-22 20:26:47 +02:00
# Fetch Omeka-S
WORKDIR /tmp
ADD https://github.com/omeka/omeka-s/releases/download/v4.0.4/omeka-s-4.0.4.zip /tmp
2023-09-22 21:52:55 +02:00
RUN unzip omeka-s-4.0.4.zip -d /var/www/html/ && rm omeka-s-4.0.4.zip
2023-09-25 13:01:31 +02:00
##COPY config/database.ini /var/www/html/omeka-s/config/database.ini
2023-09-22 20:26:47 +02:00
# 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 && \
2023-09-22 21:52:55 +02:00
chown -R nobody.nobody /var/log/nginx && \
chown -R nobody.nobody /var/log/php82
2023-09-22 20:26:47 +02:00
2023-09-25 13:01:31 +02:00
# Change to Omeka-s base dir
WORKDIR /var/www/html/omeka-s
2023-09-22 20:26:47 +02:00
# 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