-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (45 loc) · 1.63 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ARG php_version=8.2
ARG os_version=bookworm
ARG omeka_version=4.1.0
FROM php:$php_version-apache-$os_version
ENV install_arkdeps=no
ENV berkeleydb_lib=libdb5.3++-dev
ENV skip_modules=yes
LABEL maintainer="Jeroen Seeverens <[email protected]>"
LABEL description="Omeka S base image"
# build deps and utils
RUN apt-get update && \
apt-get -y install --no-install-recommends \
unzip \
mc \
jq \
tidy \
xmlstarlet \
mariadb-client \
wget
# deps
RUN apt-get -y install --no-install-recommends imagemagick
COPY profiles/template/etc/imagemagick-policy.xml /etc/ImageMagick/policy.xml
# php deps and config
RUN docker-php-ext-install -j$(nproc) pdo_mysql mysqli
COPY profiles/template/etc/php.ini /usr/local/etc/php/
# download Omeka
ARG omeka_version
RUN rm -rf /var/www/html/*
ADD https://github.com/omeka/omeka-s/releases/download/v${omeka_version}/omeka-s-${omeka_version}.zip /tmp/omeka-s.zip
RUN unzip -d /tmp/ /tmp/omeka-s.zip && mv /tmp/omeka-s/* /var/www/html/ && rm -rf /tmp/omeka-s*
RUN chmod -R +w /var/www/html/files
# apache config
COPY profiles/template/etc/.htaccess /var/www/html/.htaccess
RUN a2enmod rewrite
COPY profiles/template/etc/apache-config.conf /etc/apache2/sites-enabled/000-default.conf
RUN chown -R www-data:www-data /var/www/html/
# server init config
COPY scripts/entrypoint.sh /opt/imageboot/entrypoint.sh
COPY scripts/bootstrap.sh /opt/imageboot/bootstrap.sh
COPY scripts/install-modules.sh /opt/imageboot/install-modules.sh
COPY scripts/install-ark-deps.sh /opt/imageboot/install-ark-deps.sh
RUN chmod 755 /opt/imageboot/*.sh
# run
EXPOSE 8888
ENTRYPOINT [ "/opt/imageboot/entrypoint.sh" ]