EnglishFrenchSpanish

Ad


OnWorks favicon

docker-network-connect - Online in the Cloud

Run docker-network-connect in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command docker-network-connect that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


docker-network-connect - connect a container to a network

SYNOPSIS


docker network connect [--help] NETWORK CONTAINER

DESCRIPTION


Connects a container to a network. You can connect a container by name or by ID. Once
connected, the container can communicate with other containers in the same network.

$ docker network connect multi-host-network container1

You can also use the docker run --net=<network-name> option to start a container and
immediately connect it to a network.

$ docker run -itd --net=multi-host-network --ip 172.20.88.22 --ip6 2001:db8::8822 busybox

You can pause, restart, and stop containers that are connected to a network. Paused
containers remain connected and can be revealed by a network inspect. When the container
is stopped, it does not appear on the network until you restart it.

If specified, the container's IP address(es) is reapplied when a stopped container is
restarted. If the IP address is no longer available, the container fails to start. One way
to guarantee that the IP address is available is to specify an --ip-range when creating
the network, and choose the static IP address(es) from outside that range. This ensures
that the IP address is not given to another container while this container is not on the
network.

$ docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 multi-host-network

$ docker network connect --ip 172.20.128.2 multi-host-network container2

To verify the container is connected, use the docker network inspect command. Use docker
network disconnect to remove a container from the network.

Once connected in network, containers can communicate using only another container's IP
address or name. For overlay networks or custom plugins that support multi-host
connectivity, containers connected to the same multi-host network but launched from
different Engines can also communicate in this way.

You can connect a container to one or more networks. The networks need not be the same
type. For example, you can connect a single container bridge and overlay networks.

OPTIONS


NETWORK
Specify network name

CONTAINER
Specify container name

--help
Print usage statement

HISTORY


OCT 2015, created by Mary Anthony ⟨[email protected]

Use docker-network-connect online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 2
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 3
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 4
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 5
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • 6
    Shadowsocks
    Shadowsocks
    A fast tunnel proxy that helps you
    bypass firewalls This is an application
    that can also be fetched from
    https://sourceforge.net/projects/shadowsocksgui/.
    It ha...
    Download Shadowsocks
  • More »

Linux commands

Ad