dockerfile:
FROM ubuntu:18.04
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install mysql-server nginx php-fpm php7.2-mysql git -y && \
git clone https://github.com/78778443/xssplatform.git /var/www/html/xssplatform && \
chown -R www-data: /var/www/html/ && \
service mysql start && \
create_db_sql="CREATE USER 'xss'@'localhost' IDENTIFIED BY '123456'" && \
MYSQL_CMD='mysql -u root -p" ' && \
echo ${create_db_sql} | ${MYSQL_CMD} && \
grant_db_sql="grant all privileges on *.* to 'xss'@'localhost' with GRANT OPTION" && \
echo ${grant_db_sql} | ${MYSQL_CMD}
COPY 1.txt /etc/nginx/sites-available/default
ENTRYPOINT service nginx restart && service php7.2-fpm start && service mysql start && tail -f /var/log/nginx/error.log
1.txt:
server {
listen 80;
server_name -;
root /var/www/html/xssplatform/;
rewrite "^/([0-9a-zA-Z]{6})$" /index.php?do=code&urlKey=$1 last;
rewrite "^/do/auth/(\w+?)(/domain/([\w\.]+?))?$" /index.php?do=do&auth=$1&domain=$3 last;
rewrite "^/register/(.*?)$" /index.php?do=register&key=$1 last;
rewrite "^/register-validate/(.*?)$" /index.php?do=register&act=validate&key=$1 last;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Content type
Image
Digest
Size
156.7 MB
Last updated
over 6 years ago
docker pull mirchdocker/xss-platform