docker-vulnerable-dvwa/Dockerfile

31 lines
1.2 KiB
Docker
Raw Normal View History

2016-08-09 14:40:03 +00:00
FROM tutum/lamp:latest
MAINTAINER Rafael <rafael@thestorm.com.br>)
# Install DVWA
RUN \
rm -rf /app/* && \
apt-get update && \
2016-08-09 21:52:46 +00:00
apt-get install -y wget php5-gd unzip && \
2016-08-09 14:40:03 +00:00
rm -rf /var/lib/apt/lists/* && \
2016-08-09 21:52:46 +00:00
wget https://github.com/ethicalhack3r/DVWA/archive/v1.9.zip -O dvwa.zip && \
unzip dvwa.zip && \
cp -r DVWA-1.9/* /app/ && \
rm -rf DVWA-1.9 dvwa.zip
2016-08-09 14:40:03 +00:00
# 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 && \
2016-08-09 21:55:44 +00:00
sed -i "s/$_DVWA[ 'recaptcha_private_key' ] = ''/$_DVWA[ 'recaptcha_private_key' ] = '6LdNNycTAAAAAGuxxzwzwVC6FPJmdNqNPqdfMoim'/g" /app/config/config.inc.php && \
sed -i "s/$_DVWA[ 'recaptcha_public_key' ] = ''/$_DVWA[ 'recaptcha_public_key' ] = '6LdNNycTAAAAANH2R31pX_dcQ5V02Og2MyV1ylTX'/g" /app/config/config.inc.php
2016-08-09 14:40:03 +00:00
# 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"]