Files
container/zap/docker-compose.yml

18 lines
645 B
YAML
Raw Normal View History

2025-08-10 21:43:10 +00:00
services:
zap:
# Use the official stable image for ZAP from Docker Hub.
2025-08-10 22:00:12 +00:00
image: zaproxy/zap-stable
container_name: zap
2025-08-10 21:43:10 +00:00
ports:
# Map the host ports to the container ports.
- "${ZAP_UI_PORT}:8080"
volumes:
# Mount the named volume to the ZAP working directory.
2025-08-10 22:00:12 +00:00
- ${ZAP_VOLUME_NAME}:/home/zap/.ZAP
2025-08-10 21:43:10 +00:00
environment:
# Pass environment variables to the container.
- ZAP_AUTH_API_KEY=${ZAP_API_KEY}
# This command starts ZAP in a daemon mode.
2025-08-10 22:00:12 +00:00
command: "zap-webswing.sh -port 8080 -config api.key=${ZAP_API_KEY}"
2025-08-10 21:43:10 +00:00
# Automatically restart the container if it stops.
restart: always