inception/srcs/phpmyadmin/Dockerfile
2023-06-09 04:20:16 +02:00

36 lines
1.2 KiB
Docker

FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add nginx
RUN apk add php7
RUN apk add php7-fpm
RUN apk add php7-mysqli
RUN apk add php7-gd
RUN apk add php7-mbstring
RUN apk add php7-curl
RUN apk add php7-json
RUN apk add php7-xml
RUN apk add php7-zip
RUN apk add php7-iconv
RUN apk add php7-session
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/phpmyadmin.conf /var/www/phpmyadmin/config.inc.php
WORKDIR /root/
RUN wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-english.tar.gz
RUN tar -xvf phpMyAdmin-5.1.1-english.tar.gz
RUN mv phpMyAdmin-5.1.1-english/* /var/www/phpmyadmin/
RUN mkdir -p /var/www/phpmyadmin/tmp
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 5000/tcp