diff --git a/.dockerignore b/.dockerignore index 46cded4c..4e23de9b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,7 @@ ./build ./Jenkinsfile ./Makefile +./.gitignore +./Dockerfile +./docker + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..92552e35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:3.12 + +RUN apk update && apk upgrade && apk add tzdata apache2 \ + php7 php7-apache2 php7-ctype \ + php7-pdo php7-pdo_mysql php7-json \ + php7-session php7-opcache \ + php7-iconv php7-gd php7-openssl \ + php7-curl php7-mbstring + +ADD . /var/www/localhost/htdocs/ + +WORKDIR /var/www/localhost/htdocs + +ENV TIMEZONE=Asia/Shanghai + +EXPOSE 80 + +CMD ["/usr/sbin/httpd" "-D" "FOREGROUND"] \ No newline at end of file diff --git a/docker/etc/apache2/sites-enabled/apache.conf b/docker/etc/apache2/sites-enabled/apache.conf new file mode 100644 index 00000000..1167ae0c --- /dev/null +++ b/docker/etc/apache2/sites-enabled/apache.conf @@ -0,0 +1,10 @@ + + DocumentRoot /var/www/localhost/htdocs/www/ + + Options FollowSymLinks + AllowOverride All + Require all granted + + ErrorLog /var/log/apache2/error_log + CustomLog /var/log/apache2/access_log combined + \ No newline at end of file