github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/source/markdown/podman-network-connect.1.md (about)

     1  % podman-network-connect(1)
     2  
     3  ## NAME
     4  podman\-network\-connect - Connect a container to a network
     5  
     6  ## SYNOPSIS
     7  **podman network connect** [*options*] network container
     8  
     9  ## DESCRIPTION
    10  Connects a container to a network. A container can be connected to a network by name or by ID.
    11  Once connected, the container can communicate with other containers in the same network.
    12  
    13  This command is not available for rootless users.
    14  
    15  ## OPTIONS
    16  #### **--alias**
    17  Add network-scoped alias for the container.  If the network is using the `dnsname` CNI plugin, these aliases
    18  can be used for name resolution on the given network.  Multiple *--alias* options may be specificed as input.
    19  
    20  ## EXAMPLE
    21  
    22  Connect a container named *web* to a network named *test*
    23  ```
    24  podman network connect test web
    25  ```
    26  
    27  Connect a container name *web* to a network named *test* with two aliases: web1 and web2
    28  ```
    29  podman network connect --alias web1 --alias web2 test web
    30  ```
    31  
    32  ## SEE ALSO
    33  podman(1), podman-network(1), podman-network-disconnect(1), podman-network-inspect(1)
    34  
    35  ## HISTORY
    36  November 2020, Originally compiled by Brent Baude <bbaude@redhat.com>