mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
error when adding container to pod with network information
because a pod's network information is dictated by the infra container at creation, a container cannot be created with network attributes. this has been difficult for users to understand. we now return an error when a container is being created inside a pod and passes any of the following attributes: * static IP (v4 and v6) * static mac * ports -p (i.e. -p 8080:80) * exposed ports (i.e. 222-225) * publish ports from image -P Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -157,4 +157,8 @@ var (
|
||||
|
||||
// ErrImageInUse indicates the requested operation failed because the image was in use
|
||||
ErrImageInUse = errors.New("image is being used")
|
||||
|
||||
// ErrNetworkOnPodContainer indicates the user wishes to alter network attributes on a container
|
||||
// in a pod. This cannot be done as the infra container has all the network information
|
||||
ErrNetworkOnPodContainer = errors.New("network cannot be configured when it is shared with a pod")
|
||||
)
|
||||
|
Reference in New Issue
Block a user