Commit 17ece6e
committed
fix(docker): correctly validate container network mode
The previous implementation of `IsContainerNetworkMode` considered `container:` an
empty but valid container network mode. However, Docker rejects
"container:" without a name with "invalid container format container:".
This commit updates the `IsContainerNetworkMode` function to ensure that
there is at least one character for the container name after "container:",
aligning the validation with Docker's behavior.1 parent 1b335de commit 17ece6e
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments