inception/srcs/requirements/wordpress/Dockerfile
Danny Houtworm e43c2f854d babysteps
2023-06-25 07:05:00 +00:00

30 lines
1003 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/nginx.conf /etc/nginx/nginx.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 sh start.sh
EXPOSE 5050/tcp