-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
57 lines (39 loc) · 1.26 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
56
57
FROM node:18 AS builder
RUN apt-get update && apt-get install -y \
php \
php-cli \
php-zip \
php-xml \
php-mbstring \
php-curl \
php-sqlite3 \
php-ldap \
unzip \
cron
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
WORKDIR /app
COPY . .
RUN composer install
RUN yarn install
RUN chmod +x build.sh
RUN ./build.sh
RUN chmod +x setup-php.sh
RUN ./setup-php.sh
FROM php:8.2-apache
COPY --from=builder /app/ /var/www/html/
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
RUN ln -s simplesamlphp/public simplesaml
RUN mkdir -p /var/cache/simplesamlphp/core
RUN chown -R www-data:www-data /var/cache/simplesamlphp
RUN chmod -R 755 /var/cache/simplesamlphp
RUN mkdir -p /var/simplesamlphp/tmp
RUN mkdir -p /var/simplesamlphp/data
RUN mkdir -p /var/simplesamlphp/log
RUN chown -R www-data:www-data /var/simplesamlphp/tmp && chmod -R 750 /var/simplesamlphp/tmp
RUN chown -R www-data:www-data /var/simplesamlphp/data && chmod -R 750 /var/simplesamlphp/data
RUN chown -R www-data:www-data /var/simplesamlphp/log && chmod -R 750 /var/simplesamlphp/log
RUN echo "Listen 8080" >> /etc/apache2/ports.conf
EXPOSE 8080
RUN chmod +x run.sh
CMD ["./run.sh"]