Skip to content

Commit

Permalink
Merge pull request #102 from q384566678/config-delet
Browse files Browse the repository at this point in the history
Delete does not exist properties
  • Loading branch information
xiekeyang authored Jan 20, 2017
2 parents 848adc5 + 877e55e commit 6e09f9d
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 93 deletions.
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package: github.com/opencontainers/image-tools
import:
- package: github.com/opencontainers/image-spec
version: v1.0.0-rc2
version: v1.0.0-rc3
subpackages:
- schema
- specs-go/v1
Expand Down
15 changes: 0 additions & 15 deletions image/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,7 @@ func (c *config) runtimeSpec(rootfs string) (*specs.Spec, error) {
s.Platform.OS = c.OS
s.Platform.Arch = c.Architecture

mem := uint64(c.Config.Memory)
swap := uint64(c.Config.MemorySwap)
shares := uint64(c.Config.CPUShares)

s.Linux = &specs.Linux{}
s.Linux.Resources = &specs.Resources{
CPU: &specs.CPU{
Shares: &shares,
},

Memory: &specs.Memory{
Limit: &mem,
Reservation: &mem,
Swap: &swap,
},
}

for vol := range c.Config.Volumes {
s.Mounts = append(
Expand Down
3 changes: 0 additions & 3 deletions image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ const (
"os": "linux",
"config": {
"User": "alice",
"Memory": 2048,
"MemorySwap": 4096,
"CpuShares": 8,
"ExposedPorts": {
"8080/tcp": {}
},
Expand Down
99 changes: 52 additions & 47 deletions vendor/github.com/opencontainers/image-spec/schema/fs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions vendor/github.com/opencontainers/image-spec/schema/validator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e09f9d

Please sign in to comment.