-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (45 loc) · 1.68 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
58
59
FROM php:8.2-apache
RUN apt-get update && apt-get install -y \
unzip \
curl \
bc \
libzip-dev \
&& rm -rf /var/lib/apt/lists/*
RUN echo '<VirtualHost *:80>\n\
DocumentRoot /var/www/html/bookmarkly/public\n\
Alias /data /var/www/html/bookmarkly/data\n\
<Directory /var/www/html/bookmarkly/public>\n\
Options Indexes FollowSymLinks\n\
AllowOverride All\n\
Require all granted\n\
</Directory>\n\
<Directory /var/www/html/bookmarkly/data>\n\
Options Indexes FollowSymLinks\n\
AllowOverride All\n\
Require all granted\n\
</Directory>\n\
</VirtualHost>' > /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
RUN echo "session.auto_start = 0\n\
session.use_strict_mode = 1\n\
session.use_cookies = 1\n\
session.use_only_cookies = 1\n\
session.cookie_secure = 0\n\
session.cookie_httponly = 1\n\
session.cookie_samesite = 'Lax'\n\
session.gc_maxlifetime = 3600\n\
session.sid_length = 48\n\
session.sid_bits_per_character = 6\n\
output_buffering = 4096" > /usr/local/etc/php/conf.d/custom.ini
RUN docker-php-ext-install zip
COPY update-bookmarkly.sh /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/update-bookmarkly.sh \
&& chmod +x /usr/local/bin/docker-entrypoint.sh
COPY bookmarkly /var/www/html/bookmarkly
RUN mkdir -p /var/www/html/bookmarkly/data/uploads && \
chown -R www-data:www-data /var/www/html/bookmarkly/data && \
find /var/www/html/bookmarkly/data -type d -exec chmod 777 {} \;
VOLUME ["/var/www/html/bookmarkly/data"]
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]