forked from opsxcq/docker-vulnerable-dvwa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated debian to 9.2 and migrated to mariadb
- Loading branch information
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
FROM debian:jessie | ||
FROM debian:9.2 | ||
|
||
LABEL maintainer "[email protected]" | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
debconf-utils && \ | ||
echo mysql-server-5.5 mysql-server/root_password password vulnerables | debconf-set-selections && \ | ||
echo mysql-server-5.5 mysql-server/root_password_again password vulnerables | debconf-set-selections && \ | ||
echo mariadb-server mysql-server/root_password password vulnerables | debconf-set-selections && \ | ||
echo mariadb-server mysql-server/root_password_again password vulnerables | debconf-set-selections && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
apache2 \ | ||
mysql-server \ | ||
php5 \ | ||
php5-mysql \ | ||
mariadb-server \ | ||
php \ | ||
php-mysql \ | ||
php-pgsql \ | ||
php-pear \ | ||
php5-gd \ | ||
php-gd \ | ||
&& \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
@@ -27,6 +28,10 @@ COPY config.inc.php /var/www/html/config/ | |
RUN chown www-data:www-data -R /var/www/html && \ | ||
rm /var/www/html/index.html | ||
|
||
RUN service mysql start && \ | ||
sleep 3 && \ | ||
mysql -uroot -pvulnerables -e "CREATE USER app@localhost IDENTIFIED BY 'vulnerables';CREATE DATABASE dvwa;GRANT ALL privileges ON dvwa.* TO 'app'@localhost;" | ||
|
||
EXPOSE 80 | ||
|
||
COPY main.sh / | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters