import ( "github.com/opencontainers/runc/libcontainer/configs" ) containerConfig := &configs.Config{ Resources: &configs.Resources{ Memory: 512 * 1024 * 1024, // 512MB CPUQuota: 50000, // 50% of a single CPU core }, }
import ( "github.com/opencontainers/runc/libcontainer/configs" ) containerConfig := &configs.Config{ Network: &configs.Network{ Interfaces: []*configs.NetworkInterface{ { Name: "eth0", MacAddress: "02:42:ac:11:00:02", Address: "172.17.0.2/16", Gateway: "172.17.0.1", }, }, }, }
import ( "github.com/opencontainers/runc/libcontainer/configs" ) containerConfig := &configs.Config{ Capabilities: &configs.Capabilities{ Bounding: []string{ "CAP_NET_ADMIN", "CAP_SYS_ADMIN", }, Effective: []string{ "CAP_NET_ADMIN", "CAP_SYS_ADMIN", }, }, }Overall, this package provides a flexible way to configure container settings and is used in the "runc" container runtime.