Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
update
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
| ... | ... |
@@ -17,7 +17,6 @@ import ( |
| 17 | 17 |
"github.com/docker/docker/layer" |
| 18 | 18 |
"github.com/docker/docker/pkg/ioutils" |
| 19 | 19 |
"github.com/docker/docker/reference" |
| 20 |
- "github.com/docker/go-connections/nat" |
|
| 21 | 20 |
) |
| 22 | 21 |
|
| 23 | 22 |
// merge merges two Config, the image container configuration (defaults values), |
| ... | ... |
@@ -32,9 +31,6 @@ func merge(userConf, imageConf *containertypes.Config) error {
|
| 32 | 32 |
if len(userConf.ExposedPorts) == 0 {
|
| 33 | 33 |
userConf.ExposedPorts = imageConf.ExposedPorts |
| 34 | 34 |
} else if imageConf.ExposedPorts != nil {
|
| 35 |
- if userConf.ExposedPorts == nil {
|
|
| 36 |
- userConf.ExposedPorts = make(nat.PortSet) |
|
| 37 |
- } |
|
| 38 | 35 |
for port := range imageConf.ExposedPorts {
|
| 39 | 36 |
if _, exists := userConf.ExposedPorts[port]; !exists {
|
| 40 | 37 |
userConf.ExposedPorts[port] = struct{}{}
|