named pipe need to be mounted using the bind API

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-05-17 09:29:21 +02:00
parent 0a02f7d108
commit 8f458570c7
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E

View File

@ -604,7 +604,7 @@ MOUNTS:
for _, m := range mountOptions {
volumeMounts[m.Target] = struct{}{}
// `Bind` API is used when host path need to be created if missing, `Mount` is preferred otherwise
if m.Type == mount.TypeBind {
if m.Type == mount.TypeBind || m.Type == mount.TypeNamedPipe {
for _, v := range service.Volumes {
if v.Target == m.Target && v.Bind != nil && v.Bind.CreateHostPath {
mode := "rw"