mirror of
https://github.com/containers/podman.git
synced 2025-10-19 12:12:36 +08:00
Switch to fixed common
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
This commit is contained in:
13
vendor/github.com/containers/common/libimage/push.go
generated
vendored
13
vendor/github.com/containers/common/libimage/push.go
generated
vendored
@ -12,6 +12,7 @@ import (
|
||||
dockerDaemonTransport "github.com/containers/image/v5/docker/daemon"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/manifest"
|
||||
compressiontypes "github.com/containers/image/v5/pkg/compression/types"
|
||||
"github.com/containers/image/v5/transports/alltransports"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -86,8 +87,16 @@ func (r *Runtime) Push(ctx context.Context, source, destination string, options
|
||||
destRef = dockerRef
|
||||
}
|
||||
|
||||
// docker-archive and only DockerV2Schema2MediaType support Gzip compression
|
||||
if options.CompressionFormat != nil &&
|
||||
// docker-archive and DockerV2Schema2MediaType support only Gzip compression
|
||||
// If the CompressionFormat has come from containers.conf (set as a default),
|
||||
// but isn't supported for this push, we want to ignore it.
|
||||
// If the CompressionFormat has come from the CLI (ForceCompressionFormat
|
||||
// requires CompressionFormat to be set), we want to strip the invalid value
|
||||
// so that the push attempt fails.
|
||||
//
|
||||
// Ideally this should all happen at a much higher layer, where the code can differentiate
|
||||
// between a value coming from containers.conf vs. the CLI.
|
||||
if options.CompressionFormat != nil && options.CompressionFormat.Name() != compressiontypes.GzipAlgorithmName &&
|
||||
(destRef.Transport().Name() == dockerArchiveTransport.Transport.Name() ||
|
||||
destRef.Transport().Name() == dockerDaemonTransport.Transport.Name() ||
|
||||
options.ManifestMIMEType == manifest.DockerV2Schema2MediaType) {
|
||||
|
4
vendor/github.com/containers/common/libnetwork/types/network.go
generated
vendored
4
vendor/github.com/containers/common/libnetwork/types/network.go
generated
vendored
@ -277,7 +277,7 @@ type PerNetworkOptions struct {
|
||||
type NetworkOptions struct {
|
||||
// ContainerID is the container id, used for iptables comments and ipam allocation.
|
||||
ContainerID string `json:"container_id"`
|
||||
// ContainerName is the container name, used as dns name.
|
||||
// ContainerName is the container name.
|
||||
ContainerName string `json:"container_name"`
|
||||
// PortMappings contains the port mappings for this container
|
||||
PortMappings []PortMapping `json:"port_mappings,omitempty"`
|
||||
@ -287,6 +287,8 @@ type NetworkOptions struct {
|
||||
// List of custom DNS server for podman's DNS resolver.
|
||||
// Priority order will be kept as defined by user in the configuration.
|
||||
DNSServers []string `json:"dns_servers,omitempty"`
|
||||
// ContainerHostname is the configured DNS hostname of the container.
|
||||
ContainerHostname string `json:"container_hostname"`
|
||||
}
|
||||
|
||||
// PortMapping is one or more ports that will be mapped into the container.
|
||||
|
7
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
7
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -96,6 +96,13 @@ type ContainersConfig struct {
|
||||
// "memory.high=1073741824" sets the memory.high limit to 1GB.
|
||||
CgroupConf attributedstring.Slice `toml:"cgroup_conf,omitempty"`
|
||||
|
||||
// When no hostname is set for a container, use the container's name, with
|
||||
// characters not valid for a hostname removed, as the hostname instead of
|
||||
// the first 12 characters of the container's ID. Containers not running
|
||||
// in a private UTS namespace will have their hostname set to the host's
|
||||
// hostname regardless of this setting.
|
||||
ContainerNameAsHostName bool `toml:"container_name_as_hostname,omitempty"`
|
||||
|
||||
// Capabilities to add to all containers.
|
||||
DefaultCapabilities attributedstring.Slice `toml:"default_capabilities,omitempty"`
|
||||
|
||||
|
8
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
8
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -58,6 +58,14 @@
|
||||
#
|
||||
#cgroups = "enabled"
|
||||
|
||||
# When no hostname is set for a container, use the container's name, with
|
||||
# characters not valid for a hostname removed, as the hostname instead of
|
||||
# the first 12 characters of the container's ID. Containers not running
|
||||
# in a private UTS namespace will have their hostname set to the host's
|
||||
# hostname regardless of this setting.
|
||||
#
|
||||
#container_name_as_hostname = false
|
||||
|
||||
# List of default capabilities for containers. If it is empty or commented out,
|
||||
# the default capabilities defined in the container engine will be added.
|
||||
#
|
||||
|
6
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
6
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
@ -29,6 +29,12 @@
|
||||
#
|
||||
#base_hosts_file = ""
|
||||
|
||||
# When no hostname is set for a container, use the container's name, with
|
||||
# characters not valid for a hostname removed, as the hostname instead of
|
||||
# the first 12 characters of the container's ID.
|
||||
#
|
||||
#container_name_as_hostname = false
|
||||
|
||||
# The database backend of Podman. Supported values are "" (default), "boltdb"
|
||||
# and "sqlite". An empty value means it will check whenever a boltdb already
|
||||
# exists and use it when it does, otherwise it will use sqlite as default
|
||||
|
Reference in New Issue
Block a user