質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,6 +11,94 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
docker-compose.ymlファイルを、``docker-compose -f ./docker-compose.yml up -d``にてロード行いました。
|
14
|
+
|
15
|
+
以下は、docker-compose.ymelファイルになります。
|
16
|
+
|
17
|
+
```
|
18
|
+
|
19
|
+
version : '3.7'
|
20
|
+
|
21
|
+
services:
|
22
|
+
|
23
|
+
wordpress:
|
24
|
+
|
25
|
+
image: wordpress:latest
|
26
|
+
|
27
|
+
links:
|
28
|
+
|
29
|
+
- db:mysql
|
30
|
+
|
31
|
+
networks:
|
32
|
+
|
33
|
+
mynet:
|
34
|
+
|
35
|
+
volumes:
|
36
|
+
|
37
|
+
- wp-vol:/var/www/html
|
38
|
+
|
39
|
+
depends_on:
|
40
|
+
|
41
|
+
- db
|
42
|
+
|
43
|
+
db:
|
44
|
+
|
45
|
+
image: mariadb:latest
|
46
|
+
|
47
|
+
environment:
|
48
|
+
|
49
|
+
MYSQL_ROOT_PASSWORD: password123
|
50
|
+
|
51
|
+
networks:
|
52
|
+
|
53
|
+
mynet:
|
54
|
+
|
55
|
+
ipv4_address: 172.20.0.2
|
56
|
+
|
57
|
+
volumes:
|
58
|
+
|
59
|
+
- mysql-vol:/var/lib/mysql
|
60
|
+
|
61
|
+
volumes:
|
62
|
+
|
63
|
+
wp-vol:
|
64
|
+
|
65
|
+
driver_opts:
|
66
|
+
|
67
|
+
type: none
|
68
|
+
|
69
|
+
device: /Users/test/Desktop/docker_study/root/wordpress/data/html
|
70
|
+
|
71
|
+
o: bind
|
72
|
+
|
73
|
+
mysql-vol:
|
74
|
+
|
75
|
+
driver_opts:
|
76
|
+
|
77
|
+
type: none
|
78
|
+
|
79
|
+
device: /Users/test/Desktop/docker_study/root/wordpress/data/mysql
|
80
|
+
|
81
|
+
o: bind
|
82
|
+
|
83
|
+
networks:
|
84
|
+
|
85
|
+
mynet:
|
86
|
+
|
87
|
+
driver: bridge
|
88
|
+
|
89
|
+
ipam:
|
90
|
+
|
91
|
+
driver: default
|
92
|
+
|
93
|
+
config:
|
94
|
+
|
95
|
+
- subnet: 172.20.0.0/24
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
```
|
100
|
+
|
101
|
+
|
14
102
|
|
15
103
|
その後、以下のコマンドで、IPアドレスを調べました。
|
16
104
|
|