30 lines
1013 B
Docker
30 lines
1013 B
Docker
FROM alpine
|
|
RUN sleep 10
|
|
RUN apk update
|
|
RUN apk add openssl
|
|
RUN apk add php
|
|
RUN apk add php-fpm
|
|
RUN apk add php-mysqli
|
|
RUN apk add php-gd
|
|
RUN apk add php-mbstring
|
|
RUN apk add php-curl
|
|
RUN apk add php-json
|
|
RUN apk add php-xml
|
|
RUN apk add php-zip
|
|
COPY srcs/start.sh /root/start.sh
|
|
COPY srcs/www.conf /etc/php81/php-fpm.d/www.conf
|
|
COPY srcs/wordpress.conf /var/www/wordpress/wp-config.php
|
|
WORKDIR /root/
|
|
RUN wget https://wordpress.org/latest.tar.gz
|
|
RUN tar -xvf latest.tar.gz
|
|
RUN mv wordpress/* /var/www/wordpress/
|
|
RUN chown -R root:root /var/www
|
|
RUN openssl genrsa -out nginx.key
|
|
RUN openssl req -new -key nginx.key -out nginx.csr -subj "/C=NL/ST=Friesland/L=Heerenveen/O=localhost/OU=localhost/CN=localhost/emailAddress=djonker@student.codam.nl"
|
|
RUN openssl x509 -req -days 365 -in nginx.csr -signkey nginx.key -out nginx.crt
|
|
RUN mv nginx.crt /etc/ssl/certs/nginx.crt
|
|
RUN mv nginx.key /etc/ssl/private/nginx.key
|
|
RUN chmod 600 /etc/ssl/certs/nginx.crt /etc/ssl/private/nginx.key
|
|
CMD php-fpm81 -F -R
|
|
EXPOSE 9000/tcp
|