29 lines
870 B
Docker
29 lines
870 B
Docker
FROM php:7.3-apache
|
|
|
|
RUN apt-get update && apt-get install -y libonig-dev \
|
|
&& docker-php-ext-install mysqli mbstring \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
RUN { \
|
|
echo '<Directory /var/www/html>'; \
|
|
echo ' AllowOverride All'; \
|
|
echo '</Directory>'; \
|
|
echo ''; \
|
|
echo '<FilesMatch "\.(php|html|htm|inc)$">'; \
|
|
echo ' SetHandler application/x-httpd-php'; \
|
|
echo '</FilesMatch>'; \
|
|
} > /etc/apache2/conf-available/chocomae.conf \
|
|
&& a2enconf chocomae
|
|
|
|
ENV TZ=Asia/Seoul
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
RUN printf '#!/bin/sh\ncp /var/www/html/mouse_typing/index.html /var/www/html/index.html\nexec "$@"\n' \
|
|
> /usr/local/bin/entrypoint.sh \
|
|
&& chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
CMD ["apache2-foreground"]
|