From 645415867adfb6e6d1be4bc829c9b31a5144699c Mon Sep 17 00:00:00 2001 From: lavon <516035209@qq.com> Date: Wed, 25 Mar 2020 13:54:53 +0800 Subject: [PATCH] flink-f --- LKWA/Dockerfile | 19 +++++++++++++++++ LKWA/docker-compose.yml | 7 +++++++ Webug/Dockerfile | 26 +++++++++++++++++++++++ Webug/httpd-foreground | 12 +++++++++++ xvwa/Dockerfile | 46 +++++++++++++++++++++++++++++++++++++++++ xvwa/docker-compose.yml | 12 +++++++++++ 6 files changed, 122 insertions(+) create mode 100644 LKWA/Dockerfile create mode 100644 LKWA/docker-compose.yml create mode 100644 Webug/Dockerfile create mode 100644 Webug/httpd-foreground create mode 100644 xvwa/Dockerfile create mode 100644 xvwa/docker-compose.yml diff --git a/LKWA/Dockerfile b/LKWA/Dockerfile new file mode 100644 index 0000000..eeb2fe1 --- /dev/null +++ b/LKWA/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:18.04 +MAINTAINER weev3 +ENV TZ=Europe/Minsk +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update +RUN apt-get -y update && apt-get install -y apache2 php +COPY . /var/www/html/ +RUN chmod -R 777 /var/www/html/phar_deserial/uploads +COPY config/start.sh /usr/local/bin +COPY config/apache2.conf /etc/apache2/apache2.conf +COPY config/php.ini /etc/php/7.2/apache2/php.ini +RUN rm -rf /var/www/html/index.html +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf +RUN a2enmod php7.2 +RUN a2enmod rewrite +RUN chmod +x /usr/local/bin/start.sh +RUN service apache2 restart +CMD ["/usr/local/bin/start.sh"] +EXPOSE 80 diff --git a/LKWA/docker-compose.yml b/LKWA/docker-compose.yml new file mode 100644 index 0000000..99a29ea --- /dev/null +++ b/LKWA/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.0' +services: + web: + build: . + ports: + - "3000:80" + container_name: "lkwa" diff --git a/Webug/Dockerfile b/Webug/Dockerfile new file mode 100644 index 0000000..820836f --- /dev/null +++ b/Webug/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:trusty +MAINTAINER Area39@163.com +RUN echo "deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse"> /etc/apt/sources.list +RUN apt-get update \ + && apt-get install -y mysql-server apache2 php5 php5-mysql +COPY sql /root/ +RUN /etc/init.d/mysql start &&\ + mysql -e "grant all privileges on *.* to 'root'@'%' identified by 'toor';"&&\ + mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'toor';"&&\ + mysql -u root -ptoor -e "show databases;" &&\ + mysql -u root -ptoor --default-character-set=utf8 /tmp/my.cnf \ + && mv /tmp/my.cnf /etc/mysql/my.cnf +COPY webug /var/www/html +RUN rm /var/www/html/index.html &&\ + chown www-data:www-data /var/www/html -R &&\ + rm -rf /root/* +COPY httpd-foreground /usr/bin +EXPOSE 80 +CMD ["httpd-foreground"] diff --git a/Webug/httpd-foreground b/Webug/httpd-foreground new file mode 100644 index 0000000..5695274 --- /dev/null +++ b/Webug/httpd-foreground @@ -0,0 +1,12 @@ + +#!/bin/bash +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /usr/local/apache2/logs/httpd.pid +service mysql start +apache2ctl start +while test "1" = "1" +do +sleep 1000 +done diff --git a/xvwa/Dockerfile b/xvwa/Dockerfile new file mode 100644 index 0000000..c985862 --- /dev/null +++ b/xvwa/Dockerfile @@ -0,0 +1,46 @@ +FROM phusion/baseimage:0.9.15 + +# Ensure UTF-8 +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + +ENV HOME /root + +RUN /etc/my_init.d/00_regen_ssh_host_keys.sh + +CMD ["/sbin/my_init"] + +# Nginx-PHP Installation +RUN apt-get update +RUN apt-get install --reinstall ca-certificates +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y vim curl wget build-essential python-software-properties software-properties-common php5 +RUN apt-get update +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --force-yes php5-cli php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl\ + php5-gd php5-mcrypt php5-intl php5-imap php5-tidy + +RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/fpm/php.ini +RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/cli/php.ini + +RUN sed -i "s/allow_url_include =.*/allow_url_include = On/" /etc/php5/fpm/php.ini +RUN sed -i "s/allow_url_include =.*/allow_url_include = On/" /etc/php5/cli/php.ini + +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nginx + +RUN echo "daemon off;" >> /etc/nginx/nginx.conf +RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf +RUN sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php5/fpm/php.ini + +RUN mkdir -p /var/www +ADD build/default /etc/nginx/sites-available/default +RUN mkdir /etc/service/nginx +ADD build/nginx.sh /etc/service/nginx/run +RUN chmod +x /etc/service/nginx/run +RUN mkdir /etc/service/phpfpm +ADD build/phpfpm.sh /etc/service/phpfpm/run +RUN chmod +x /etc/service/phpfpm/run + +EXPOSE 80 +# End Nginx-PHP + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/xvwa/docker-compose.yml b/xvwa/docker-compose.yml new file mode 100644 index 0000000..a2e58fe --- /dev/null +++ b/xvwa/docker-compose.yml @@ -0,0 +1,12 @@ +web: + build: . + ports: + - "8000:80" + volumes: + - ./:/var/www + links: + - db +db: + image: orchardup/mysql + environment: + MYSQL_DATABASE: xvwa