|
# Use nginx:stable-alpine as the base image |
|
FROM nginx:stable-alpine |
|
|
|
# Set environment |
|
ENV |
|
ENV |
|
|
|
# Install |
|
RUN |
|
apk |
|
git |
|
wget |
|
curl |
|
unzip |
|
php7 |
|
php7-fpm |
|
php7-common |
|
php7-mysqli |
|
php7-xml |
|
php7-xmlrpc |
|
php7-curl |
|
php7-gd |
|
php7-imagick |
|
php7-dev |
|
php7-imap |
|
php7-mbstring |
|
php7-opcache |
|
php7-soap |
|
php7-zip |
|
php7-intl |
|
|
|
# Configure |
|
RUN |
|
listen 7860; \ |
|
root /var/www/html; \ |
|
index index.php index.html index.htm; \ |
|
location / { \ |
|
try_files \$uri \$uri/ =404; \ |
|
} \ |
|
location ~ \.php$ { \ |
|
fastcgi_pass 127.0.0.1:9000; \ |
|
fastcgi_index index.php; \ |
|
include fastcgi_params; \ |
|
} \ |
|
}" /etc//conf.d/ |
|
|
|
# Clone |
|
RUN /var/ |
|
cd /var/ |
|
rm |
|
git ///PBhadoo/ |
|
cd /var//html && \ |
|
mkdir files && \ |
|
chmod 777 files && \ |
|
chmod 777 configs && \ |
|
chmod 777 configs/ |
|
rm |
|
wget ///rar/ |
|
tar |
|
rm |
|
chmod |
|
chmod /* && \ |
|
sed -i //www//configs/ |
|
sed /var//html//config.php |
|
|
|
# Expose the desired port |
|
EXPOSE 7860 |
|
|
|
# Start Nginx and PHP-FPM |
|
CMD php-fpm7 && nginx -g |