File tree Expand file tree Collapse file tree 4 files changed +38
-0
lines changed Expand file tree Collapse file tree 4 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -525,6 +525,17 @@ run on the machine.
525525A list of default pasta options that should be used running pasta.
526526It accepts the pasta cli options, see pasta(1) for the full list of options.
527527
528+ ** default_host_ips** =[ ]
529+
530+ The default host IPs to bind published container ports to when no host IP
531+ is explicitly specified in the ` -p ` flag (e.g., ` -p 8000:8000 ` ). If empty, the default
532+ behavior is to bind to all network interfaces (` 0.0.0.0 ` ). If multiple IPs are specified,
533+ separate port mapping for each of the specified IP would be created. For instance, setting
534+ this to ` ["127.0.0.1", "::1"] ` and port specified as ` -p 8080:80 ` will result into two
535+ port mappings in podman--` 127.0.0.1:8080:80 ` and ` [::1]:8080:80 ` .
536+ Note that explicitly specifying a host IP in the ` -p ` flag (e.g., ` -p 192.168.1.10:8000:8000 ` )
537+ will always override this default.
538+
528539## ENGINE TABLE
529540The ` engine ` table contains configuration options used to set up container engines such as Podman and Buildah.
530541
Original file line number Diff line number Diff line change @@ -634,6 +634,13 @@ type NetworkConfig struct {
634634 // PastaOptions contains a default list of pasta(1) options that should
635635 // be used when running pasta.
636636 PastaOptions attributedstring.Slice `toml:"pasta_options,omitempty"`
637+
638+ // DefaultHostIPs is the default host IPs to bind published container ports
639+ // to when no host IP is explicitly specified in the -p flag (e.g., -p 80:80).
640+ // If empty, the default behavior is to bind to all interfaces (0.0.0.0).
641+ // If multiple IPs are specified, separate port mapping for each of the specified
642+ // IP would be created.
643+ DefaultHostIPs []string `toml:"default_host_ips,omitempty"`
637644}
638645
639646type SubnetPool struct {
Original file line number Diff line number Diff line change @@ -445,6 +445,16 @@ default_sysctls = [
445445#
446446#pasta_options = []
447447
448+ # The default host IPs to bind published container ports to when no host IP
449+ # is explicitly specified in the -p flag (e.g., -p 8000:8000). If empty, the default
450+ # behavior is to bind to all network interfaces (0.0.0.0). If multiple IPs are specified,
451+ # separate port mapping for each of the specified IP would be created. For instance, setting
452+ # this to ["127.0.0.1", "::1"] and port specified as -p 8080:80 will result into two
453+ # port mappings in podman--127.0.0.1:8080:80 and [::1]:8080:80.
454+ # Note that explicitly specifying a host IP via -p will always override this.
455+ #
456+ #default_host_ips = []
457+
448458[engine]
449459# Index to the active service
450460#
Original file line number Diff line number Diff line change @@ -335,6 +335,16 @@ default_sysctls = [
335335#
336336#network_config_dir = "/usr/local/etc/cni/net.d/"
337337
338+ # The default host IPs to bind published container ports to when no host IP
339+ # is explicitly specified in the -p flag (e.g., -p 8000:8000). If empty, the default
340+ # behavior is to bind to all network interfaces (0.0.0.0). If multiple IPs are specified,
341+ # separate port mapping for each of the specified IP would be created. For instance, setting
342+ # this to ["127.0.0.1", "::1"] and port specified as -p 8080:80 will result into two
343+ # port mappings in podman--127.0.0.1:8080:80 and [::1]:8080:80.
344+ # Note that explicitly specifying a host IP via -p will always override this.
345+ #
346+ #default_host_ips = []
347+
338348[engine]
339349# Index to the active service
340350#
You can’t perform that action at this time.
0 commit comments