Fix privileged support
This commit is contained in:
Lantao Liu 2019-12-11 17:14:01 -08:00 committed by GitHub
commit e68cc95fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -8,8 +8,9 @@ environment:
GOPATH: C:\gopath GOPATH: C:\gopath
PATH: C:\go\bin;C:\tools\mingw64\bin;$(PATH) PATH: C:\go\bin;C:\tools\mingw64\bin;$(PATH)
CGO_ENABLED: 1 CGO_ENABLED: 1
GO111MODULE: off
matrix: matrix:
- GO_VERSION: 1.12.9 - GO_VERSION: 1.13.4
install: install:
# Install Mingw # Install Mingw

View File

@ -3,7 +3,7 @@ git:
language: go language: go
go: go:
- 1.12.x - 1.13.4
- tip - tip
@ -13,6 +13,9 @@ matrix:
sudo: required sudo: required
env:
- GO111MODULE=off
services: services:
- docker - docker

View File

@ -170,7 +170,7 @@ func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint3
} }
specOpts = append(specOpts, oci.WithPrivileged) specOpts = append(specOpts, oci.WithPrivileged)
if !ociRuntime.PrivilegedWithoutHostDevices { if !ociRuntime.PrivilegedWithoutHostDevices {
specOpts = append(specOpts, oci.WithHostDevices) specOpts = append(specOpts, oci.WithHostDevices, oci.WithAllDevicesAllowed)
} }
} else { // not privileged } else { // not privileged
specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext)) specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext))