Artples commited on
Commit
3d4a502
·
verified ·
1 Parent(s): 5e8513b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -17
Dockerfile CHANGED
@@ -1,35 +1,41 @@
1
  FROM nextcloud:apache
2
 
3
-
4
  ENV APACHE_PORT=7860
5
 
6
-
7
  RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
8
- && sed -i "s/Listen 80/Listen ${APACHE_PORT}/" /etc/apache2/ports.conf \
9
- && sed -i "s/:80/:${APACHE_PORT}/" /etc/apache2/sites-available/000-default.conf
10
-
11
 
12
  RUN apt-get update \
13
- && apt-get install -y --no-install-recommends mariadb-server mariadb-client dos2unix \
14
- && rm -rf /var/lib/apt/lists/*
15
-
 
 
 
 
16
 
17
  RUN { \
18
- echo "[mysqld]"; \
19
- echo "bind-address=127.0.0.1"; \
20
- echo "skip-name-resolve"; \
21
- echo "character-set-server=utf8mb4"; \
22
- echo "collation-server=utf8mb4_general_ci"; \
23
- echo "innodb_file_per_table=1"; \
24
  } > /etc/mysql/mariadb.conf.d/99-hf-space.cnf
25
 
 
 
 
 
 
 
 
26
 
27
  COPY start.sh /start.sh
28
  RUN dos2unix /start.sh && chmod +x /start.sh
29
 
30
-
31
  EXPOSE 7860
32
 
33
-
34
  ENTRYPOINT ["/start.sh"]
35
- CMD ["apache2-foreground"]
 
1
  FROM nextcloud:apache
2
 
 
3
  ENV APACHE_PORT=7860
4
 
 
5
  RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
6
+ && sed -i "s/Listen 80/Listen ${APACHE_PORT}/" /etc/apache2/ports.conf \
7
+ && sed -i "s/:80/:${APACHE_PORT}/" /etc/apache2/sites-available/000-default.conf
 
8
 
9
  RUN apt-get update \
10
+ && apt-get install -y --no-install-recommends \
11
+ mariadb-server mariadb-client \
12
+ redis-server \
13
+ cron \
14
+ ffmpeg \
15
+ dos2unix \
16
+ && rm -rf /var/lib/apt/lists/*
17
 
18
  RUN { \
19
+ echo "[mysqld]"; \
20
+ echo "bind-address=127.0.0.1"; \
21
+ echo "skip-name-resolve"; \
22
+ echo "character-set-server=utf8mb4"; \
23
+ echo "collation-server=utf8mb4_general_ci"; \
24
+ echo "innodb_file_per_table=1"; \
25
  } > /etc/mysql/mariadb.conf.d/99-hf-space.cnf
26
 
27
+ RUN printf "*/5 * * * * www-data php -f /var/www/html/cron.php >/dev/null 2>&1\n" > /etc/cron.d/nextcloud \
28
+ && chmod 0644 /etc/cron.d/nextcloud
29
+
30
+ RUN mkdir -p /docker-entrypoint-hooks.d/post-installation
31
+ COPY post-installation/10-tune.sh /docker-entrypoint-hooks.d/post-installation/10-tune.sh
32
+ RUN dos2unix /docker-entrypoint-hooks.d/post-installation/10-tune.sh \
33
+ && chmod +x /docker-entrypoint-hooks.d/post-installation/10-tune.sh
34
 
35
  COPY start.sh /start.sh
36
  RUN dos2unix /start.sh && chmod +x /start.sh
37
 
 
38
  EXPOSE 7860
39
 
 
40
  ENTRYPOINT ["/start.sh"]
41
+ CMD ["apache2-foreground"]