-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (40 loc) · 2.03 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Dockerfile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: prodrigo <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/01/02 17:12:35 by prodrigo #+# #+# #
# Updated: 2021/03/22 16:39:57 by prodrigo ### ########.fr #
# #
# **************************************************************************** #
FROM debian:buster
ENV AUTOINDEX on
RUN apt-get update && apt-get install -y \
wget \
nginx \
mariadb-server \
php-fpm php-mysql php-mbstring php-xml \
&& rm -rf /var/lib/apt/lists/*
# Web files are located in /var/www/html
RUN rm var/www/html/index.nginx-debian.html
COPY srcs/nginx/*.conf /tmp/
RUN wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-english.tar.gz && \
tar -xzvf phpMyAdmin-5.1.0-english.tar.gz && \
mv phpMyAdmin-5.1.0-english/ /var/www/html/phpmyadmin && \
rm -rf phpMyAdmin-5.1.0-english.tar.gz
COPY srcs/phpmyadmin/config.inc.php /var/www/html/phpmyadmin
RUN wget https://wordpress.org/latest.tar.gz && \
tar -xzvf latest.tar.gz && \
mv wordpress /var/www/html/ && \
rm -rf latest.tar.gz
COPY srcs/wordpress/wp-config.php /var/www/html/wordpress
RUN mkdir ~/mkcert && cd ~/mkcert && \
wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 && \
mv mkcert-v1.4.3-linux-amd64 mkcert && chmod +x mkcert && \
./mkcert -install && ./mkcert localhost
RUN chown -R www-data:www-data /var/www/html/*
COPY srcs/*.sh ./
EXPOSE 80 443
CMD bash script.sh && tail -f /dev/null