From aba31f8e05daf855be7ee2ed9544e9497f3f5643 Mon Sep 17 00:00:00 2001 From: OPSXCQ Date: Tue, 9 Aug 2016 10:40:03 -0400 Subject: [PATCH] first commit --- Dockerfile | 31 +++++++++++++++++++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bc1106f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM tutum/lamp:latest + +MAINTAINER Rafael ) + +# Install DVWA +RUN \ + rm -rf /app/* && \ + apt-get update && \ + apt-get install -y wget php5-gd && \ + rm -rf /var/lib/apt/lists/* && \ + wget https://github.com/RandomStorm/DVWA/archive/master.tar.gz -O dvwa.tar.gz && \ + tar -xf dvwa.tar.gz && \ + cp -r DVWA-master/* /app/ && \ + rm -rf DVWA-master && \ + rm -rf dvwa.tar.gz + +# Fix some issues about default lamp installation +RUN \ + chmod -R 777 /app/hackable/uploads/ /app/external/phpids/0.6/lib/IDS/tmp/phpids_log.txt && \ + sed -i 's/allow_url_include = Off/allow_url_include = On/g' /etc/php5/apache2/php.ini && \ + sed -i "s/$_DVWA[ 'recaptcha_private_key' ] = ''/$_DVWA[ 'recaptcha_private_key' ] = '6LcdSCQTAAAAAGYfl1nYDeK8Dt_Art60KRIMgLXb'/g" /app/config/config.inc.php && \ + sed -i "s/$_DVWA[ 'recaptcha_public_key' ] = ''/$_DVWA[ 'recaptcha_public_key' ] = '6LcdSCQTAAAAAGYfl1nYDeK8Dt_Art60KRIMgLXb'/g" /app/config/config.inc.php + +# Configure the db access +RUN \ + sed -i 's/root/admin/g' /app/config/config.inc.php && \ + echo "sed -i \"s/p@ssw0rd/\$PASS/g\" /app/config/config.inc.php" >> /create_mysql_admin_user.sh + +EXPOSE 80 3306 +CMD ["/run.sh"] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..6df1ce3 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Damn Vulnerable Web Application Docker container + +Just a DVWA container for docker + +## Build + +docker build -t dvwa . + +## Run + +docker run -d -p 80:80 -p 3306:3306 dvwa