質問編集履歴
1
検証結果の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -103,3 +103,21 @@
|
|
103
103
|
```
|
104
104
|
|
105
105
|
コンテナ内のapacheユーザーとrootユーザーのメイングループはホストのDockerグループと同じIDのグループにしているのですが、何が原因でしょうか
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
2019年4月22日22時25分追記
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
apacheユーザーのシェルにbashで入ってDockerコマンドを実行したところ、パーミッションは拒否されず、実行できました。そこで、Git hookから```id```の実行結果を出力してみると以下のようになりました。
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
remote: uid=48(apache) gid=48(apache) groups=48(apache)
|
118
|
+
|
119
|
+
remote: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/build?buildargs=%7B%7D&buildbinds=null&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=hoge%3Adev&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
|
120
|
+
|
121
|
+
```
|
122
|
+
|
123
|
+
どうやら、Git hookのPHPのexecからコマンドを打つとdockerグループとして認識されていないようです。
|