mirror of
https://github.com/containers/podman.git
synced 2025-10-19 20:23:08 +08:00
vendor in latest containers/(storage,common,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
10
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -95,6 +95,13 @@ type ContainersConfig struct {
|
||||
// Annotation to add to all containers
|
||||
Annotations []string `toml:"annotations,omitempty"`
|
||||
|
||||
// BaseHostsFile is the path to a hosts file, the entries from this file
|
||||
// are added to the containers hosts file. As special value "image" is
|
||||
// allowed which uses the /etc/hosts file from within the image and "none"
|
||||
// which uses no base file at all. If it is empty we should default
|
||||
// to /etc/hosts.
|
||||
BaseHostsFile string `toml:"base_hosts_file,omitempty"`
|
||||
|
||||
// Default way to create a cgroup namespace for the container
|
||||
CgroupNS string `toml:"cgroupns,omitempty"`
|
||||
|
||||
@ -136,6 +143,9 @@ type ContainersConfig struct {
|
||||
// EnvHost Pass all host environment variables into the container.
|
||||
EnvHost bool `toml:"env_host,omitempty"`
|
||||
|
||||
// HostContainersInternalIP is used to set a specific host.containers.internal ip.
|
||||
HostContainersInternalIP string `toml:"host_containers_internal_ip,omitempty"`
|
||||
|
||||
// HTTPProxy is the proxy environment variable list to apply to container process
|
||||
HTTPProxy bool `toml:"http_proxy,omitempty"`
|
||||
|
||||
|
39
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
39
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -26,6 +26,13 @@
|
||||
#
|
||||
#apparmor_profile = "container-default"
|
||||
|
||||
# The hosts entries from the base hosts file are added to the containers hosts
|
||||
# file. This must be either an absolute path or as special values "image" which
|
||||
# uses the hosts file from the container image or "none" which means
|
||||
# no base hosts file is used. The default is "" which will use /etc/hosts.
|
||||
#
|
||||
#base_hosts_file = ""
|
||||
|
||||
# Default way to to create a cgroup namespace for the container
|
||||
# Options are:
|
||||
# `private` Create private Cgroup Namespace for the container.
|
||||
@ -114,6 +121,16 @@ default_sysctls = [
|
||||
#
|
||||
#env_host = false
|
||||
|
||||
# Set the ip for the host.containers.internal entry in the containers /etc/hosts
|
||||
# file. This can be set to "none" to disable adding this entry. By default it
|
||||
# will automatically choose the host ip.
|
||||
#
|
||||
# NOTE: When using podman machine this entry will never be added to the containers
|
||||
# hosts file instead the gvproxy dns resolver will resolve this hostname. Therefore
|
||||
# it is not possible to disable the entry in this case.
|
||||
#
|
||||
#host_containers_internal_ip = ""
|
||||
|
||||
# Default proxy environment variables passed into the container.
|
||||
# The environment variables passed in include:
|
||||
# http_proxy, https_proxy, ftp_proxy, no_proxy, and the upper case versions of
|
||||
@ -464,9 +481,26 @@ default_sysctls = [
|
||||
#network_cmd_path = ""
|
||||
|
||||
# Default options to pass to the slirp4netns binary.
|
||||
# For example "allow_host_loopback=true"
|
||||
# Valid options values are:
|
||||
#
|
||||
#network_cmd_options = ["enable_ipv6=true",]
|
||||
# - allow_host_loopback=true|false: Allow the slirp4netns to reach the host loopback IP (`10.0.2.2`).
|
||||
# Default is false.
|
||||
# - mtu=MTU: Specify the MTU to use for this network. (Default is `65520`).
|
||||
# - cidr=CIDR: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
|
||||
# - enable_ipv6=true|false: Enable IPv6. Default is true. (Required for `outbound_addr6`).
|
||||
# - outbound_addr=INTERFACE: Specify the outbound interface slirp should bind to (ipv4 traffic only).
|
||||
# - outbound_addr=IPv4: Specify the outbound ipv4 address slirp should bind to.
|
||||
# - outbound_addr6=INTERFACE: Specify the outbound interface slirp should bind to (ipv6 traffic only).
|
||||
# - outbound_addr6=IPv6: Specify the outbound ipv6 address slirp should bind to.
|
||||
# - port_handler=rootlesskit: Use rootlesskit for port forwarding. Default.
|
||||
# Note: Rootlesskit changes the source IP address of incoming packets to a IP address in the container
|
||||
# network namespace, usually `10.0.2.100`. If your application requires the real source IP address,
|
||||
# e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for
|
||||
# rootless containers when connected to user-defined networks.
|
||||
# - port_handler=slirp4netns: Use the slirp4netns port forwarding, it is slower than rootlesskit but
|
||||
# preserves the correct source IP address. This port handler cannot be used for user-defined networks.
|
||||
#
|
||||
#network_cmd_options = []
|
||||
|
||||
# Whether to use chroot instead of pivot_root in the runtime
|
||||
#
|
||||
@ -644,4 +678,3 @@ default_sysctls = [
|
||||
# TOML does not provide a way to end a table other than a further table being
|
||||
# defined, so every key hereafter will be part of [machine] and not the
|
||||
# main config.
|
||||
|
||||
|
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -122,6 +122,8 @@ const (
|
||||
CgroupfsCgroupsManager = "cgroupfs"
|
||||
// DefaultApparmorProfile specifies the default apparmor profile for the container.
|
||||
DefaultApparmorProfile = apparmor.Profile
|
||||
// DefaultHostsFile is the default path to the hosts file
|
||||
DefaultHostsFile = "/etc/hosts"
|
||||
// SystemdCgroupsManager represents systemd native cgroup manager
|
||||
SystemdCgroupsManager = "systemd"
|
||||
// DefaultLogSizeMax is the default value for the maximum log size
|
||||
@ -189,6 +191,7 @@ func DefaultConfig() (*Config, error) {
|
||||
Volumes: []string{},
|
||||
Annotations: []string{},
|
||||
ApparmorProfile: DefaultApparmorProfile,
|
||||
BaseHostsFile: "",
|
||||
CgroupNS: cgroupNS,
|
||||
Cgroups: "enabled",
|
||||
DefaultCapabilities: DefaultCapabilities,
|
||||
@ -299,9 +302,6 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
c.ServiceTimeout = uint(5)
|
||||
c.StopTimeout = uint(10)
|
||||
c.ExitCommandDelay = uint(5 * 60)
|
||||
c.NetworkCmdOptions = []string{
|
||||
"enable_ipv6=true",
|
||||
}
|
||||
c.Remote = isRemote()
|
||||
c.OCIRuntimes = map[string][]string{
|
||||
"crun": {
|
||||
|
25
vendor/github.com/containers/common/pkg/secrets/shelldriver/shelldriver.go
generated
vendored
25
vendor/github.com/containers/common/pkg/secrets/shelldriver/shelldriver.go
generated
vendored
@ -3,12 +3,12 @@ package shelldriver
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@ -27,22 +27,33 @@ var (
|
||||
type driverConfig struct {
|
||||
// DeleteCommand contains a shell command that deletes a secret.
|
||||
// The secret id is provided as environment variable SECRET_ID
|
||||
DeleteCommand string `mapstructure:"delete"`
|
||||
DeleteCommand string
|
||||
// ListCommand contains a shell command that lists all secrets.
|
||||
// The output is expected to be one id per line
|
||||
ListCommand string `mapstructure:"list"`
|
||||
ListCommand string
|
||||
// LookupCommand contains a shell command that retrieves a secret.
|
||||
// The secret id is provided as environment variable SECRET_ID
|
||||
LookupCommand string `mapstructure:"lookup"`
|
||||
LookupCommand string
|
||||
// StoreCommand contains a shell command that stores a secret.
|
||||
// The secret id is provided as environment variable SECRET_ID
|
||||
// The secret value itself is provided over stdin
|
||||
StoreCommand string `mapstructure:"store"`
|
||||
StoreCommand string
|
||||
}
|
||||
|
||||
func (cfg *driverConfig) ParseOpts(opts map[string]string) error {
|
||||
if err := mapstructure.Decode(opts, cfg); err != nil {
|
||||
return err
|
||||
for key, value := range opts {
|
||||
switch key {
|
||||
case "delete":
|
||||
cfg.DeleteCommand = value
|
||||
case "list":
|
||||
cfg.ListCommand = value
|
||||
case "lookup":
|
||||
cfg.LookupCommand = value
|
||||
case "store":
|
||||
cfg.StoreCommand = value
|
||||
default:
|
||||
return fmt.Errorf("invalid shell driver option: %q", key)
|
||||
}
|
||||
}
|
||||
if cfg.DeleteCommand == "" ||
|
||||
cfg.ListCommand == "" ||
|
||||
|
Reference in New Issue
Block a user