mirror of
https://github.com/containers/podman.git
synced 2025-11-13 09:38:05 +08:00
image lookup: do not match *any* tags
For reasons buried in the history of Podman, looking up an untagged image would match any tag of matching image. For instance, looking up centos would match a local image centos:foobar. Change that behavior to only match the latest tag. Fix: #11964 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
6
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -215,6 +215,12 @@ type EngineConfig struct {
|
||||
// The first path pointing to a valid file will be used.
|
||||
ConmonPath []string `toml:"conmon_path,omitempty"`
|
||||
|
||||
// CompatAPIEnforceDockerHub enforces using docker.io for completing
|
||||
// short names in Podman's compatibility REST API. Note that this will
|
||||
// ignore unqualified-search-registries and short-name aliases defined
|
||||
// in containers-registries.conf(5).
|
||||
CompatAPIEnforceDockerHub bool `toml:"compat_api_enforce_docker_hub,omitempty"`
|
||||
|
||||
// DetachKeys is the sequence of keys used to detach a container.
|
||||
DetachKeys string `toml:"detach_keys,omitempty"`
|
||||
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -317,6 +317,11 @@ default_sysctls = [
|
||||
# "/usr/local/sbin/conmon"
|
||||
#]
|
||||
|
||||
# Enforces using docker.io for completing short names in Podman's compatibility
|
||||
# REST API. Note that this will ignore unqualified-search-registries and
|
||||
# short-name aliases defined in containers-registries.conf(5).
|
||||
#compat_api_enforce_docker_hub = true
|
||||
|
||||
# Specify the keys sequence used to detach a container.
|
||||
# Format is a single character [a-Z] or a comma separated sequence of
|
||||
# `ctrl-<value>`, where `<value>` is one of:
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
5
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -190,6 +190,7 @@ func DefaultConfig() (*Config, error) {
|
||||
IPCNS: "private",
|
||||
LogDriver: defaultLogDriver(),
|
||||
LogSizeMax: DefaultLogSizeMax,
|
||||
NetNS: "private",
|
||||
NoHosts: false,
|
||||
PidsLimit: DefaultPidsLimit,
|
||||
PidNS: "private",
|
||||
@@ -225,7 +226,7 @@ func defaultSecretConfig() SecretConfig {
|
||||
func defaultMachineConfig() MachineConfig {
|
||||
return MachineConfig{
|
||||
CPUs: 1,
|
||||
DiskSize: 10,
|
||||
DiskSize: 100,
|
||||
Image: "testing",
|
||||
Memory: 2048,
|
||||
}
|
||||
@@ -243,6 +244,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
|
||||
c.EventsLogFilePath = filepath.Join(c.TmpDir, "events", "events.log")
|
||||
|
||||
c.CompatAPIEnforceDockerHub = true
|
||||
|
||||
if path, ok := os.LookupEnv("CONTAINERS_STORAGE_CONF"); ok {
|
||||
types.SetDefaultConfigFilePath(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user