-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (35 loc) · 1.41 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
FROM library/php:8.1-apache
# set skosmos release version and download link
ARG version=v2.18.1-1.0.0
ARG SKOSMOS_TARGZ_RELEASE_URL=https://github.com/knaw-huc/Skosmos/archive/refs/tags/${version}.tar.gz
# general server setup and locale
RUN apt-get update && \
apt-get -y install gettext locales curl unzip vim git libicu-dev libxslt-dev && \
for locale in en_GB en_US fi_FI fr_FR sv_SE; do \
echo "${locale}.UTF-8 UTF-8" >> /etc/locale.gen ; \
done && \
locale-gen
# config apache2
RUN a2enmod rewrite
RUN a2enmod expires
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Install Skosmos
RUN rm -rf /var/www/html/* && curl -L --output skosmos.tar.gz ${SKOSMOS_TARGZ_RELEASE_URL} && \
tar -zxvf skosmos.tar.gz -C /var/www/html/ --strip-components=1 && \
rm -rf /Skosmos* /skosmos.tar.gz
# install composer required php packs
RUN docker-php-ext-install intl
RUN docker-php-ext-install xsl
RUN docker-php-ext-install gettext
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install Skosmos dependencies
RUN /usr/local/bin/composer install --no-dev --no-interaction
# Configure Skosmos
COPY skosmos-repository.ttl /var/www/
COPY entrypoint.sh /var/www/
COPY entrypoint_cron.sh /var/www/
COPY ./src /var/www/src
COPY entrypoint.py /var/www/
COPY config-docker-compose.ttl /var/www/html/
ENTRYPOINT ["/var/www/entrypoint.sh"]