File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ COPY . /var/www/sqlmap/
25
25
WORKDIR /var/www/sqlmap
26
26
27
27
# Now point the scripts to connect to mysql
28
- RUN sed -i 's/"localhost"/"mysql "/' /var/www/sqlmap/libs/mysql.inc.php
29
- RUN sed -i 's/"localhost"/"mysql "/' /var/www/sqlmap/libs/mysql_user.inc.php
28
+ RUN sed -i 's/"localhost"/"mydb "/' /var/www/sqlmap/libs/mysql.inc.php
29
+ RUN sed -i 's/"localhost"/"mydb "/' /var/www/sqlmap/libs/mysql_user.inc.php
30
30
31
31
# Listen on port 80
32
32
EXPOSE 80
Original file line number Diff line number Diff line change 1
- mysql :
1
+ mydb :
2
2
image : mysql
3
3
environment :
4
4
- MYSQL_ROOT_PASSWORD=testpass
5
5
6
-
7
6
testenv :
8
7
image : andresriancho/testenv:latest
9
8
ports :
10
9
- " 8998:80"
11
10
links :
12
- - mysql
11
+ - mydb
12
+ environment :
13
+ - APACHE_RUN_USER=www-data
14
+ - APACHE_RUN_GROUP=www-data
15
+ - APACHE_LOG_DIR=/var/log/apache2/
13
16
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
# Wait for database to get available
4
- MYSQL_LOOPS=" 10 "
5
- MYSQL_HOST=" mysql "
4
+ MYSQL_LOOPS=" 20 "
5
+ MYSQL_HOST=" mydb "
6
6
MYSQL_PORT=" 3306"
7
7
8
8
# Wait for mysql
19
19
20
20
21
21
echo " Create the database"
22
- mysql -u root -ptestpass -h mysql mysql < /var/www/sqlmap/schema/mysql.sql
22
+ mysql -u root -ptestpass -h ${MYSQL_HOST} mysql < /var/www/sqlmap/schema/mysql.sql
23
23
24
24
25
25
echo " Start apache"
You can’t perform that action at this time.
0 commit comments