1podman-network-connect(1)   General Commands Manual  podman-network-connect(1)
2
3
4

NAME

6       podman-network-connect - Connect a container to a network
7
8

SYNOPSIS

10       podman network connect [options] network container
11
12

DESCRIPTION

14       Connects  a  container  to a network. A container can be connected to a
15       network by name or by ID.  Once connected, the container  can  communi‐
16       cate with other containers in the same network.
17
18

OPTIONS

20   --alias=name
21       Add  network-scoped alias for the container. If the network has DNS en‐
22       abled (podman network inspect -f {{.DNSEnabled}} <NAME>), these aliases
23       can be used for name resolution on the given network.  Multiple --alias
24       options may be specified as input.  NOTE: When using CNI,  a  container
25       only  has  access  to  aliases on the first network that it joins. This
26       limitation does not exist with netavark/aardvark-dns.
27
28
29   --ip=address
30       Set a static ipv4 address for this container on this network.
31
32
33   --ip6=address
34       Set a static ipv6 address for this container on this network.
35
36
37   --mac-address=address
38       Set a static mac address for this container on this network.
39
40

EXAMPLE

42       Connect a container named web to a network named test
43
44       podman network connect test web
45
46
47
48       Connect a container name web to a network named test with two  aliases:
49       web1 and web2
50
51       podman network connect --alias web1 --alias web2 test web
52
53
54
55       Connect a container name web to a network named test with a static ip.
56
57       podman network connect --ip 10.89.1.13 test web
58
59
60

SEE ALSO

62       podman(1),  podman-network(1),  podman-network-inspect(1),  podman-net‐
63       work-disconnect(1)
64
65

HISTORY

67       November 2020, Originally compiled  by  Brent  Baude  bbaude@redhat.com
68       ⟨mailto:bbaude@redhat.com⟩
69
70
71
72                                                     podman-network-connect(1)
Impressum