mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
generator.New() requires an OS string input variable
Signed-off-by: baude <bbaude@redhat.com> Closes: #1007 Approved by: baude
This commit is contained in:
@ -75,7 +75,10 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
|
|||||||
valid: true,
|
valid: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
g := generate.New()
|
g, err := generate.New("linux")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
ctr.config.Spec = g.Spec()
|
ctr.config.Spec = g.Spec()
|
||||||
|
|
||||||
ctr.config.Labels["test"] = "testing"
|
ctr.config.Labels["test"] = "testing"
|
||||||
|
@ -21,7 +21,10 @@ const cpuPeriod = 100000
|
|||||||
// CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec
|
// CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec
|
||||||
func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
|
func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
|
||||||
cgroupPerm := "ro"
|
cgroupPerm := "ro"
|
||||||
g := generate.New()
|
g, err := generate.New("linux")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
g.HostSpecific = true
|
g.HostSpecific = true
|
||||||
addCgroup := true
|
addCgroup := true
|
||||||
if config.Privileged {
|
if config.Privileged {
|
||||||
|
Reference in New Issue
Block a user