.nh .TH podman-network-connect 1 .SH NAME .PP podman-network-connect - Connect a container to a network .SH SYNOPSIS .PP \fBpodman network connect\fP [\fIoptions\fP] network container .SH DESCRIPTION .PP Connects a container to a network. A container can be connected to a network by name or by ID. Once connected, the container can communicate with other containers in the same network. .SH OPTIONS .SS \fB--alias\fP=\fIname\fP .PP Add network-scoped alias for the container. If the network has DNS enabled (\fBpodman network inspect -f {{.DNSEnabled}} \fR), these aliases can be used for name resolution on the given network. Multiple \fI--alias\fP options may be specified as input. NOTE: When using CNI, a container only has access to aliases on the first network that it joins. This limitation does not exist with netavark/aardvark-dns. .SS \fB--ip\fP=\fIaddress\fP .PP Set a static ipv4 address for this container on this network. .SS \fB--ip6\fP=\fIaddress\fP .PP Set a static ipv6 address for this container on this network. .SS \fB--mac-address\fP=\fIaddress\fP .PP Set a static mac address for this container on this network. .SH EXAMPLE .PP Connect specified container to a named network: .EX podman network connect test web .EE .PP Connect specified container to named network with two aliases: .EX podman network connect --alias web1 --alias web2 test web .EE .PP Connect specified container to named network with a static ip: .EX podman network connect --ip 10.89.1.13 test web .EE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-network(1)\fP, \fBpodman-network-inspect(1)\fP, \fBpodman-network-disconnect(1)\fP .SH HISTORY .PP November 2020, Originally compiled by Brent Baude bbaude@redhat.com \[la]mailto:bbaude@redhat.com\[ra]