feat: 添加Postgre测试靶场

This commit is contained in:
ZacharyZcR 2024-12-20 19:35:26 +08:00
parent 92217f572f
commit 763da727ac
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# 使用PostgreSQL官方镜像
FROM postgres:latest
# 设置环境变量
ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=123456
ENV POSTGRES_DB=mydb
# 开放5432端口
EXPOSE 5432
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s \
CMD pg_isready -U postgres || exit 1

View File

@ -0,0 +1,5 @@
docker build -t postgres-server .
docker run -d \
-p 5432:5432 \
--name postgres-container \
postgres-server