Update Dockerfile
Browse files- Dockerfile +21 -12
Dockerfile
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
|
|
| 1 |
FROM nextcloud:apache
|
| 2 |
|
|
|
|
| 3 |
ENV APACHE_PORT=7860
|
| 4 |
|
|
|
|
| 5 |
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
RUN apt-get update \
|
| 10 |
-
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
RUN { \
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
} > /etc/mysql/mariadb.conf.d/99-hf-space.cnf
|
| 21 |
|
|
|
|
| 22 |
COPY start.sh /start.sh
|
| 23 |
-
RUN sed -i 's
|
|
|
|
|
|
|
| 24 |
|
| 25 |
EXPOSE 7860
|
| 26 |
|
|
|
|
| 27 |
ENTRYPOINT ["/start.sh"]
|
| 28 |
-
CMD ["apache2-foreground"]
|
|
|
|
| 1 |
+
# Dockerfile (place this file in the repository root)
|
| 2 |
FROM nextcloud:apache
|
| 3 |
|
| 4 |
+
|
| 5 |
ENV APACHE_PORT=7860
|
| 6 |
|
| 7 |
+
|
| 8 |
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
|
| 9 |
+
&& sed -i "s/Listen 80/Listen ${APACHE_PORT}/" /etc/apache2/ports.conf \
|
| 10 |
+
&& sed -i "s/:80/:${APACHE_PORT}/" /etc/apache2/sites-available/000-default.conf
|
| 11 |
+
|
| 12 |
|
| 13 |
RUN apt-get update \
|
| 14 |
+
&& apt-get install -y --no-install-recommends mariadb-server mariadb-client \
|
| 15 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 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 |
+
|
| 28 |
COPY start.sh /start.sh
|
| 29 |
+
RUN sed -i 's/
|
| 30 |
+
$//' /start.sh && chmod +x /start.sh
|
| 31 |
+
|
| 32 |
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
+
|
| 36 |
ENTRYPOINT ["/start.sh"]
|
| 37 |
+
CMD ["apache2-foreground"]
|