mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
7
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
7
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
nettypes "github.com/containers/common/libnetwork/types"
|
||||
@@ -250,8 +251,12 @@ func defaultSecretConfig() SecretConfig {
|
||||
|
||||
// defaultMachineConfig returns the default machine configuration.
|
||||
func defaultMachineConfig() MachineConfig {
|
||||
cpus := runtime.NumCPU() / 2
|
||||
if cpus == 0 {
|
||||
cpus = 1
|
||||
}
|
||||
return MachineConfig{
|
||||
CPUs: 1,
|
||||
CPUs: uint64(cpus),
|
||||
DiskSize: 100,
|
||||
Image: getDefaultMachineImage(),
|
||||
Memory: 2048,
|
||||
|
||||
Reference in New Issue
Block a user