podman-network-connect(1)

πŸ’… podman-network-connect πŸ’…

ok so bestie, welcome to podman-network-connect(1) ✨ β€” yes that's the real name and yes it's from the General Commands Manual. This is the page where your container gets introduced to a whole new network like it's freshman orientation πŸŽ€


🌸 NAME 🌸

podman-network-connect β€” literally just Connect a container to a network πŸ’–


✨ SYNOPSIS ✨

podman network connect [options] network container

that's it. that's the whole vibe. πŸ¦‹


πŸ’« DESCRIPTION πŸ’«

So here's the tea πŸ“: this command connects a container to a network. And you can pick that container by name or by ID β€” whichever one your brain has the bandwidth for today, no judgement πŸ’….

And once it's connected? the container can communicate with other containers in the same network. that's it. it's in the group chat now. it's mutuals with everybody. iconic behavior honestly πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --alias=name β€” adds a network-scoped alias for the container πŸ’– if the network has DNS enabled (peep it with podman network inspect -f {{.DNSEnabled}} <NAME>), these aliases can be used for name resolution on that given network β€” on top of the container name, not instead of it, bestie. You can pass --alias multiple times as input, so go off πŸŽ‰ check out DNS NOTES in podman-network(1) if you want the full lore.
  • --ip=address β€” sets a static ipv4 address for this container on this network ✨
  • --ip6=address β€” sets a static ipv6 address for this container on this network 🌈
  • --mac-address=address β€” sets a static mac address for this container on this network πŸ¦‹

πŸ”₯ EXAMPLES πŸ”₯

Connect specified container to a named network β€” the classic, the blueprint:

podman network connect test web

Connect specified container to named network with two aliases β€” she has range:

podman network connect --alias web1 --alias web2 test web

Connect specified container to named network with a static ip:

podman network connect --ip 10.89.1.13 test web

Connect specified container to named network with a static mac address:

podman network connect --mac-address 92:d0:c6:0a:29:33 test web

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group πŸ’œ


πŸ“œ HISTORY πŸ“œ

November 2020, Originally compiled by Brent Baude bbaude@redhat.com ⟨mailto:bbaude@redhat.com⟩ 🫢


aaand that's the page, bestie πŸ§šπŸ’« it's podman-network-connect(1), last vibes from November 2020, and honestly? still slaying. go connect something. no cap. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from