(mounts []xunix.Mount)
| 194 | } |
| 195 | |
| 196 | func generateBindMounts(mounts []xunix.Mount) []string { |
| 197 | binds := make([]string, 0, len(mounts)) |
| 198 | for _, mount := range mounts { |
| 199 | bind := fmt.Sprintf("%s:%s", mount.Source, mount.Mountpoint) |
| 200 | if mount.ReadOnly { |
| 201 | bind += ":ro" |
| 202 | } |
| 203 | binds = append(binds, bind) |
| 204 | } |
| 205 | |
| 206 | return binds |
| 207 | } |