63 lines
1.8 KiB
Groff
63 lines
1.8 KiB
Groff
.nh
|
|
.TH podman-network-connect 1
|
|
.SH NAME
|
|
podman-network-connect \- Connect a container to a network
|
|
|
|
.SH SYNOPSIS
|
|
\fBpodman network connect\fP [\fIoptions\fP] network container
|
|
|
|
.SH DESCRIPTION
|
|
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
|
|
Add network-scoped alias for the container. If the network has DNS enabled (\fBpodman network inspect -f {{.DNSEnabled}} <NAME>\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
|
|
Set a static ipv4 address for this container on this network.
|
|
|
|
.SS \fB--ip6\fP=\fIaddress\fP
|
|
Set a static ipv6 address for this container on this network.
|
|
|
|
.SS \fB--mac-address\fP=\fIaddress\fP
|
|
Set a static mac address for this container on this network.
|
|
|
|
.SH EXAMPLES
|
|
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
|
|
|
|
.PP
|
|
Connect specified container to named network with a static mac address:
|
|
|
|
.EX
|
|
podman network connect --mac-address 92:d0:c6:0a:29:33 test web
|
|
.EE
|
|
|
|
.SH SEE ALSO
|
|
\fBpodman(1)\fP, \fBpodman-network(1)\fP, \fBpodman-network-inspect(1)\fP, \fBpodman-network-disconnect(1)\fP
|
|
|
|
.SH HISTORY
|
|
November 2020, Originally compiled by Brent Baude bbaude@redhat.com
|
|
\[la]mailto:bbaude@redhat.com\[ra]
|