diff --git a/.travis.yml b/.travis.yml index 2058e8d69..dd3bc17e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ install: - unzip -o -d /tmp/protobuf /tmp/protoc-3.1.0-linux-x86_64.zip - export PATH=$PATH:/tmp/protobuf/bin/ - go get -u github.com/vbatts/git-validation - - sudo wget https://github.com/crosbymichael/runc/releases/download/ctd-2/runc -O /bin/runc; sudo chmod +x /bin/runc + - sudo wget https://github.com/crosbymichael/runc/releases/download/ctd-3/runc -O /bin/runc; sudo chmod +x /bin/runc - wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz - tar -C /tmp/ -zxf /tmp/criu.tar.gz - cd /tmp/criu-3.0 && sudo make install-criu diff --git a/cmd/ctr/run_windows.go b/cmd/ctr/run_windows.go index c2deb62b3..be9f49720 100644 --- a/cmd/ctr/run_windows.go +++ b/cmd/ctr/run_windows.go @@ -64,7 +64,7 @@ func spec(id string, config *ocispec.ImageConfig, context *cli.Context) *specs.S return &specs.Spec{ Version: specs.Version, - Root: specs.Root{ + Root: &specs.Root{ Readonly: context.Bool("readonly"), }, Process: &specs.Process{ diff --git a/spec_unix.go b/spec_unix.go index e714580d3..d8e07c9c4 100644 --- a/spec_unix.go +++ b/spec_unix.go @@ -64,7 +64,7 @@ func defaultNamespaces() []specs.LinuxNamespace { func createDefaultSpec() (*specs.Spec, error) { s := &specs.Spec{ Version: specs.Version, - Root: specs.Root{ + Root: &specs.Root{ Path: defaultRootfsPath, }, Process: &specs.Process{ @@ -81,7 +81,7 @@ func createDefaultSpec() (*specs.Spec, error) { Effective: defaltCaps(), Ambient: defaltCaps(), }, - Rlimits: []specs.LinuxRlimit{ + Rlimits: []specs.POSIXRlimit{ { Type: "RLIMIT_NOFILE", Hard: uint64(1024), diff --git a/spec_windows.go b/spec_windows.go index a4e153706..ff06fc3cc 100644 --- a/spec_windows.go +++ b/spec_windows.go @@ -18,7 +18,7 @@ const pipeRoot = `\\.\pipe` func createDefaultSpec() (*specs.Spec, error) { return &specs.Spec{ Version: specs.Version, - Root: specs.Root{}, + Root: &specs.Root{}, Process: &specs.Process{ ConsoleSize: &specs.Box{ Width: 80, diff --git a/vendor.conf b/vendor.conf index e0c414637..cb2bfb720 100644 --- a/vendor.conf +++ b/vendor.conf @@ -14,7 +14,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.0 github.com/docker/go-units v0.3.1 github.com/gogo/protobuf d2e1ade2d719b78fe5b061b4c18a9f7111b5bdc8 github.com/golang/protobuf 5a0f697c9ed9d68fef0116532c6e05cfeae00e55 -github.com/opencontainers/runtime-spec 198f23f827eea397d4331d7eb048d9d4c7ff7bee +github.com/opencontainers/runtime-spec v1.0.0-rc6 github.com/opencontainers/runc 429a5387123625040bacfbb60d96b1cbd02293ab github.com/Sirupsen/logrus v0.11.0 github.com/containerd/btrfs e9c546f46bccffefe71a6bc137e4c21b5503cc18 diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go index 68ab112ef..c00f96ebc 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go @@ -9,7 +9,7 @@ type Spec struct { // Process configures the container process. Process *Process `json:"process,omitempty"` // Root configures the container's root filesystem. - Root Root `json:"root"` + Root *Root `json:"root,omitempty"` // Hostname configures the container's hostname. Hostname string `json:"hostname,omitempty"` // Mounts configures additional mounts (on top of Root). @@ -45,7 +45,7 @@ type Process struct { // Capabilities are Linux capabilities that are kept for the process. Capabilities *LinuxCapabilities `json:"capabilities,omitempty" platform:"linux"` // Rlimits specifies rlimit options to apply to the process. - Rlimits []LinuxRlimit `json:"rlimits,omitempty" platform:"linux"` + Rlimits []POSIXRlimit `json:"rlimits,omitempty" platform:"linux,solaris"` // NoNewPrivileges controls whether additional privileges could be gained by processes in the container. NoNewPrivileges bool `json:"noNewPrivileges,omitempty" platform:"linux"` // ApparmorProfile specifies the apparmor profile for the container. @@ -94,7 +94,7 @@ type User struct { // Root contains information about the container's root filesystem on the host. type Root struct { // Path is the absolute path to the container's root filesystem. - Path string `json:"path,omitempty"` + Path string `json:"path"` // Readonly makes the root filesystem for the container readonly before the process is executed. Readonly bool `json:"readonly,omitempty"` } @@ -202,8 +202,8 @@ type LinuxIDMapping struct { Size uint32 `json:"size"` } -// LinuxRlimit type and restrictions -type LinuxRlimit struct { +// POSIXRlimit type and restrictions +type POSIXRlimit struct { // Type of the rlimit to set Type string `json:"type"` // Hard is the hard limit for the specified type @@ -550,7 +550,7 @@ const ( type LinuxSeccompArg struct { Index uint `json:"index"` Value uint64 `json:"value"` - ValueTwo uint64 `json:"valueTwo"` + ValueTwo uint64 `json:"valueTwo,omiempty"` Op LinuxSeccompOperator `json:"op"` } diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go index dfcf0090e..4804b80fc 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go @@ -11,7 +11,7 @@ const ( VersionPatch = 0 // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "-rc5-dev" + VersionDev = "-rc6" ) // Version is the specification version that the package types support.