mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Vendor c/common
Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -13,7 +13,7 @@ require (
|
||||
github.com/containernetworking/cni v1.1.2
|
||||
github.com/containernetworking/plugins v1.3.0
|
||||
github.com/containers/buildah v1.32.0
|
||||
github.com/containers/common v0.56.1-0.20230920110729-eb4ad859f309
|
||||
github.com/containers/common v0.56.1-0.20230920191016-f4e726d4b162
|
||||
github.com/containers/conmon v2.0.20+incompatible
|
||||
github.com/containers/gvisor-tap-vsock v0.7.1-0.20230921084021-9298405740ad
|
||||
github.com/containers/image/v5 v5.28.0
|
||||
|
4
go.sum
4
go.sum
@ -249,8 +249,8 @@ github.com/containernetworking/plugins v1.3.0 h1:QVNXMT6XloyMUoO2wUOqWTC1hWFV62Q
|
||||
github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0=
|
||||
github.com/containers/buildah v1.32.0 h1:uz5Rcf7lGeStj7iPTBgO4UdhQYZqMMzyt9suDf16k1k=
|
||||
github.com/containers/buildah v1.32.0/go.mod h1:sN3rA3DbnqekNz3bNdkqWduuirYDuMs54LUCOZOomBE=
|
||||
github.com/containers/common v0.56.1-0.20230920110729-eb4ad859f309 h1:ZuP6m9Ps9bBR/3TlR4AqzobAvtYstKkoYmKIg3R7O84=
|
||||
github.com/containers/common v0.56.1-0.20230920110729-eb4ad859f309/go.mod h1:ABFEglmyt48WWWQv80kGhitfbVfR1Br35wk3gBQdrIk=
|
||||
github.com/containers/common v0.56.1-0.20230920191016-f4e726d4b162 h1:94djwIUmnWY9tzQmbMsZ58Kpjg2vx1e0R1HfpTYDkMM=
|
||||
github.com/containers/common v0.56.1-0.20230920191016-f4e726d4b162/go.mod h1:ABFEglmyt48WWWQv80kGhitfbVfR1Br35wk3gBQdrIk=
|
||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||
github.com/containers/gvisor-tap-vsock v0.7.1-0.20230921084021-9298405740ad h1:bJu6ieGZqM6C1SyDkpw2x7D3T5VqajoyvudLmdS50e0=
|
||||
|
28
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
28
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -1100,34 +1100,6 @@ func Reload() (*Config, error) {
|
||||
return New(&Options{SetDefault: true})
|
||||
}
|
||||
|
||||
func (c *Config) ActiveDestination() (uri, identity string, machine bool, err error) {
|
||||
if uri, found := os.LookupEnv("CONTAINER_HOST"); found {
|
||||
if v, found := os.LookupEnv("CONTAINER_SSHKEY"); found {
|
||||
identity = v
|
||||
}
|
||||
return uri, identity, false, nil
|
||||
}
|
||||
connEnv := os.Getenv("CONTAINER_CONNECTION")
|
||||
switch {
|
||||
case connEnv != "":
|
||||
d, found := c.Engine.ServiceDestinations[connEnv]
|
||||
if !found {
|
||||
return "", "", false, fmt.Errorf("environment variable CONTAINER_CONNECTION=%q service destination not found", connEnv)
|
||||
}
|
||||
return d.URI, d.Identity, d.IsMachine, nil
|
||||
|
||||
case c.Engine.ActiveService != "":
|
||||
d, found := c.Engine.ServiceDestinations[c.Engine.ActiveService]
|
||||
if !found {
|
||||
return "", "", false, fmt.Errorf("%q service destination not found", c.Engine.ActiveService)
|
||||
}
|
||||
return d.URI, d.Identity, d.IsMachine, nil
|
||||
case c.Engine.RemoteURI != "":
|
||||
return c.Engine.RemoteURI, c.Engine.RemoteIdentity, false, nil
|
||||
}
|
||||
return "", "", false, errors.New("no service destination configured")
|
||||
}
|
||||
|
||||
var (
|
||||
bindirFailed = false
|
||||
bindirCached = ""
|
||||
|
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,
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -164,7 +164,7 @@ github.com/containers/buildah/pkg/sshagent
|
||||
github.com/containers/buildah/pkg/util
|
||||
github.com/containers/buildah/pkg/volumes
|
||||
github.com/containers/buildah/util
|
||||
# github.com/containers/common v0.56.1-0.20230920110729-eb4ad859f309
|
||||
# github.com/containers/common v0.56.1-0.20230920191016-f4e726d4b162
|
||||
## explicit; go 1.18
|
||||
github.com/containers/common/libimage
|
||||
github.com/containers/common/libimage/define
|
||||
|
Reference in New Issue
Block a user