aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 16 insertions, 10 deletions
diff --git a/Dockerfile b/Dockerfile
index 28f93bc..7b0c0e6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,22 +2,28 @@ FROM debian:buster
RUN apt update && \
apt install -y nginx \
- mariadb-server \
php-fpm \
- php-mysql \
- phpmyadmin \
- php-mbstring \
- php-gettext
+ mariadb-server \
+ php-mysql
+ # phpmyadmin \
+ # php-mbstring \
+ # php-gettext
-COPY srcs/wordpress /var/www/html
COPY srcs/conf /etc/nginx/sites-available/
+COPY srcs/wordpress /var/www
+# COPY srcs/test /var/www
RUN ln -fs /etc/nginx/sites-available/test.com /etc/nginx/sites-enabled/default
EXPOSE 80
-RUN service nginx start && \
- service mysql start && \
- service php7.3-fpm start
+RUN service mysql start && \
+ echo "CREATE DATABASE testdb;" | mysql -u root && \
+ echo "CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY '';" | mysql -u root && \
+ echo "GRANT ALL PRIVILEGES ON testdb.* TO 'wordpressuser'@'localhost' IDENTIFIED BY '';" | mysql -u root && \
+ echo "FLUSH PRIVILEGES;" | mysql -u root
-CMD sleep infinity & wait
+CMD service php7.3-fpm start && \
+ service mysql start && \
+ service nginx start && \
+ sleep infinity & wait