Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -6,8 +6,6 @@ import ( |
| 6 | 6 |
"path/filepath" |
| 7 | 7 |
"regexp" |
| 8 | 8 |
"strings" |
| 9 |
- |
|
| 10 |
- "github.com/docker/docker/pkg/system" |
|
| 11 | 9 |
) |
| 12 | 10 |
|
| 13 | 11 |
// read-write modes |
| ... | ... |
@@ -77,23 +75,13 @@ const ( |
| 77 | 77 |
// - Variation on hostdir but can be a drive followed by colon as well |
| 78 | 78 |
// - If a path, must be absolute. Can include spaces |
| 79 | 79 |
// - Drive cannot be c: (explicitly checked in code, not RegEx) |
| 80 |
-) |
|
| 81 |
- |
|
| 82 |
-// RXMode is the regex expression for the mode of the mount |
|
| 83 |
-var RXMode string |
|
| 84 | 80 |
|
| 85 |
-func init() {
|
|
| 86 |
- osv := system.GetOSVersion() |
|
| 87 |
- // Read-only volumes supported from 14350 onwards (post Windows Server 2016 TP5) |
|
| 81 |
+ // RXMode is the regex expression for the mode of the mount |
|
| 88 | 82 |
// Mode (optional): |
| 89 | 83 |
// - Hopefully self explanatory in comparison to above regex's. |
| 90 | 84 |
// - Colon is not in the capture group |
| 91 |
- if osv.Build >= 14350 {
|
|
| 92 |
- RXMode = `(:(?P<mode>(?i)ro|rw))?` |
|
| 93 |
- } else {
|
|
| 94 |
- RXMode = `(:(?P<mode>(?i)rw))?` |
|
| 95 |
- } |
|
| 96 |
-} |
|
| 85 |
+ RXMode = `(:(?P<mode>(?i)ro|rw))?` |
|
| 86 |
+) |
|
| 97 | 87 |
|
| 98 | 88 |
// BackwardsCompatible decides whether this mount point can be |
| 99 | 89 |
// used in old versions of Docker or not. |