mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
feat: 添加MySQL测试靶场
This commit is contained in:
parent
bf1b45f407
commit
92217f572f
17
TestDocker/MySQL/Dockerfile
Normal file
17
TestDocker/MySQL/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# 使用MySQL官方镜像
|
||||
FROM mysql:latest
|
||||
|
||||
# 设置环境变量
|
||||
ENV MYSQL_ROOT_PASSWORD=123456
|
||||
ENV MYSQL_DATABASE=mydb
|
||||
|
||||
# 开放3306端口
|
||||
EXPOSE 3306
|
||||
|
||||
# MySQL配置
|
||||
# 允许远程访问
|
||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||
|
||||
# 健康检查
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" -e "SELECT 1" || exit 1
|
5
TestDocker/MySQL/README.txt
Normal file
5
TestDocker/MySQL/README.txt
Normal file
@ -0,0 +1,5 @@
|
||||
docker build -t mysql-server .
|
||||
docker run -d \
|
||||
-p 3306:3306 \
|
||||
--name mysql-container \
|
||||
mysql-server
|
2
TestDocker/MySQL/my.cnf
Normal file
2
TestDocker/MySQL/my.cnf
Normal file
@ -0,0 +1,2 @@
|
||||
[mysqld]
|
||||
bind-address = 0.0.0.0
|
Loading…
Reference in New Issue
Block a user