質問編集履歴

2

docker-sompose.ymlの記述を移動させました

2020/05/20 13:11

投稿

ekko
ekko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,39 @@
28
28
 
29
29
 
30
30
 
31
- docker-compose.yml
31
+ まともな回答できるかわかりませんがどうかよろしくお願いいたします・・・
32
+
33
+
34
+
35
+ ### 発生している問題・エラーメッセージ
36
+
37
+
38
+
39
+ ```
40
+
41
+ $ docker-compose up -d
42
+
43
+ Starting workspace_mysql_1 ... done Starting workspace_app_1 ... done Starting e6b32e05abd5_workspace_web_1 ... error
44
+
45
+ ERROR: for e6b32e05abd5_workspace_web_1 Cannot start service web: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\"/c/Program Files/Docker Toolbox/workspace/docker/web/default.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged\\" at \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged/etc/nginx/conf.d/default.conf\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
46
+
47
+
48
+
49
+ ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\"/c/Program Files/Docker Toolbox/workspace/docker/web/default.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged\\" at \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged/etc/nginx/conf.d/default.conf\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
50
+
51
+ ERROR: Encountered errors while bringing up the project.
52
+
53
+ ```
54
+
55
+
56
+
57
+ ### 該当のソースコード
58
+
59
+
60
+
61
+ ```ここに言語名を入力
62
+
63
+ docker-sompose.yml
32
64
 
33
65
 
34
66
 
@@ -44,7 +76,7 @@
44
76
 
45
77
  - "8000:80"
46
78
 
47
- depends_on:
79
+ depends_on: # 追加
48
80
 
49
81
  - app
50
82
 
@@ -82,7 +114,7 @@
82
114
 
83
115
  ports:
84
116
 
85
- - "3333:3310"
117
+ - "3333:3309"
86
118
 
87
119
  volumes:
88
120
 
@@ -93,44 +125,6 @@
93
125
  mysql-data:
94
126
 
95
127
 
96
-
97
-
98
-
99
-
100
-
101
- まともな回答できるかわかりませんがどうかよろしくお願いいたします・・・
102
-
103
-
104
-
105
- ### 発生している問題・エラーメッセージ
106
-
107
-
108
-
109
- ```
110
-
111
- $ docker-compose up -d
112
-
113
- Starting workspace_mysql_1 ... done Starting workspace_app_1 ... done Starting e6b32e05abd5_workspace_web_1 ... error
114
-
115
- ERROR: for e6b32e05abd5_workspace_web_1 Cannot start service web: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\"/c/Program Files/Docker Toolbox/workspace/docker/web/default.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged\\" at \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged/etc/nginx/conf.d/default.conf\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
116
-
117
-
118
-
119
- ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\"/c/Program Files/Docker Toolbox/workspace/docker/web/default.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged\\" at \\"/mnt/sda1/var/lib/docker/overlay2/04c86545fb911a663255304852c9d79eceeeb3760a6eac37f78a0865fbc8b7d5/merged/etc/nginx/conf.d/default.conf\\" caused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
120
-
121
- ERROR: Encountered errors while bringing up the project.
122
-
123
- ```
124
-
125
-
126
-
127
- ### 該当のソースコード
128
-
129
-
130
-
131
- ```ここに言語名を入力
132
-
133
- ソースコード
134
128
 
135
129
  ```
136
130
 

1

docker-somposeの記述を追加しました

2020/05/20 13:11

投稿

ekko
ekko

スコア0

test CHANGED
File without changes
test CHANGED
@@ -25,6 +25,76 @@
25
25
  ├── docker-compose.yml
26
26
 
27
27
  └── app/
28
+
29
+
30
+
31
+ docker-compose.yml
32
+
33
+
34
+
35
+ version: '3'
36
+
37
+ services:
38
+
39
+ web:
40
+
41
+ image: nginx:1.15.6
42
+
43
+ ports:
44
+
45
+ - "8000:80"
46
+
47
+ depends_on:
48
+
49
+ - app
50
+
51
+ volumes:
52
+
53
+ - ./docker/web/default.conf:/etc/nginx/conf.d/default.conf
54
+
55
+ - .:/var/www/html
56
+
57
+ app:
58
+
59
+ build: ./docker/php
60
+
61
+ volumes:
62
+
63
+ - .:/var/www/html
64
+
65
+ depends_on:
66
+
67
+ - mysql
68
+
69
+ mysql:
70
+
71
+ image: mysql:5.7
72
+
73
+ environment:
74
+
75
+ MYSQL_DATABASE: ****
76
+
77
+ MYSQL_USER: ****
78
+
79
+ MYSQL_PASSWORD: ****
80
+
81
+ MYSQL_ROOT_PASSWORD: ****
82
+
83
+ ports:
84
+
85
+ - "3333:3310"
86
+
87
+ volumes:
88
+
89
+ - mysql-data:/var/lib/mysql
90
+
91
+ volumes:
92
+
93
+ mysql-data:
94
+
95
+
96
+
97
+
28
98
 
29
99
 
30
100