-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
115 lines (106 loc) · 3.18 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#version: "3.9"
services:
db:
container_name: ftws-db
image: mysql:latest #mysql:8.4
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
#command: --default-authentication-plugin=mysql_native_password - NOT WORK
#command: ["mysqld", "--mysql-native-password=ON"] - NOT WORK
environment:
MYSQL_ROOT_PASSWORD: PenTestLab
MYSQL_USER: dbadmin_ftws
MYSQL_PASSWORD: FTWSLab
MYSQL_DATABASE: ftws_db
healthcheck:
test: [ "CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', '$$MYSQl_USER', '-p$$MYSQL_PASSWORD' ]
interval: 10s
timeout: 5s
retries: 3
networks:
pentest-net:
ipv4_address: 10.0.0.5
ports:
- 33060:3306
restart: unless-stopped
# ==== FTWS, a Fully of Threat Web Site with Apache and MySQL ====
php:
container_name: ftws-php
#image: php:fpm
build:
context: web_site
dockerfile: website.Dockerfile
args:
CONTAINER_IMAGE: 'php:fpm'
volumes:
- ./web_site/ftws:/srv/ftws
depends_on:
db:
condition: service_healthy
networks:
pentest-net:
ipv4_address: 10.0.0.4
web:
image: nginx:latest
depends_on:
- db
- php
# links:
# - php-fpm
networks:
pentest-net:
ipv4_address: 10.0.0.254
ports:
- 8085:80
volumes:
- ./webserver/nginx.conf:/etc/nginx/conf.d/default.conf
- ./web_site/ftws:/srv/ftws
# ==== NextCloud ====
# nextcloud:
# container_name: nextcloud
# hostname: nextcloud
# networks:
# pentest-net:
# ipv4_address: 10.0.0.10
# ports:
# - "3000:80"
# image: 'nextcloud'
# ==== Metasploitable2 Container ====
# metasploitable2:
# container_name: metasploitable
# hostname: metasploitable
# ports:
# - "8080:80"
# networks:
# pentest-net:
# ipv4_address: 10.0.0.3
# stdin_open: true
# tty: true
# image: "tleemcjr/metasploitable2"
# ==== Attacker Container ====
# security:
# container_name: parrot
# hostname: parrot
# network_mode: pentest-net
# networks:
# pentest-net:
# ipv4_address: 10.0.0.2
# volumes:
# - './attacker:/attacker'
# stdin_open: true
# tty: true
# image: 'parrotsec/security:latest'
networks:
pentest-net:
name: pentest-net
driver: bridge
ipam:
driver: default
config:
- subnet: 10.0.0.0/24
gateway: 10.0.0.1
# ---------------------------------------
# [DB - MySQL]: mysql_native_password
# * WARNING: Change Authentication plugint to caching_sha2_password
# * 2024-08-12 "MySQL 9 no longer supports the mysql_native_password authentication method" : https://github.com/Homebrew/homebrew-core/issues/180498
# * 2024-06-30 https://stackoverflow.com/questions/78445419/unknown-variable-default-authentication-plugin-mysql-native-password