Skip to content

Commit b9a8e77

Browse files
author
zhouhao
committed
Delete does not exist properties
Signed-off-by: zhouhao <[email protected]>
1 parent ad5fa6e commit b9a8e77

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

image/config.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,7 @@ func (c *config) runtimeSpec(rootfs string) (*specs.Spec, error) {
109109
s.Platform.OS = c.OS
110110
s.Platform.Arch = c.Architecture
111111

112-
mem := uint64(c.Config.Memory)
113-
swap := uint64(c.Config.MemorySwap)
114-
shares := uint64(c.Config.CPUShares)
115-
116112
s.Linux = &specs.Linux{}
117-
s.Linux.Resources = &specs.Resources{
118-
CPU: &specs.CPU{
119-
Shares: &shares,
120-
},
121-
122-
Memory: &specs.Memory{
123-
Limit: &mem,
124-
Reservation: &mem,
125-
Swap: &swap,
126-
},
127-
}
128113

129114
for vol := range c.Config.Volumes {
130115
s.Mounts = append(

image/image_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ const (
4343
"os": "linux",
4444
"config": {
4545
"User": "alice",
46-
"Memory": 2048,
47-
"MemorySwap": 4096,
48-
"CpuShares": 8,
4946
"ExposedPorts": {
5047
"8080/tcp": {}
5148
},

0 commit comments

Comments
 (0)