-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (26 loc) · 988 Bytes
/
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
FROM php:8.2.4-apache
# TSN TSN-Ranksystem Version
ARG VERSION=1.3.22
EXPOSE 80
ENV APACHE_DOCUMENT_ROOT /app
RUN apt update \
&& apt install -y git zlib1g-dev libzip-dev dumb-init \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install zip mysqli pdo pdo_mysql
RUN git clone https://github.com/Newcomer1989/TSN-Ranksystem.git /app \
&& cd ${APACHE_DOCUMENT_ROOT} \
&& git fetch --all --tags --prune \
&& git checkout tags/${VERSION} \
&& rm -R .git .github \
&& mv /app/other /app/other.default \
&& mkdir -p /cronjob \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
COPY php.ini /usr/local/etc/php/php.ini
VOLUME ["/app/other","/app/logs"]
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bash", "-c", "/entrypoint.sh"]
WORKDIR /app
ADD entrypoint.sh /