Class Network<C extends CommandWithArgumentList>

    • Method Detail

      • createBridge

        public static Network.Create createBridge​(String name)
        Create a Docker network using the bridge driver.
        Parameters:
        name - the name of the network to create
        Returns:
        a new Network.Create command.
      • createOverlay

        public static Network.Create createOverlay​(String name)
        Create a Docker network using the overlay driver.
        Parameters:
        name - the name of the network to create
        Returns:
        a new Network.Create command.
      • create

        public static Network.Create create​(String name,
                                            String driver)
        Create a Docker network using the specified driver.
        Parameters:
        name - the name of the network to create
        driver - the name of the network driver to use
        Returns:
        a new Network.Create command.
      • connect

        public static Network.Connect connect​(String network,
                                              String container)
        Connect a container to a Docker network.
        Parameters:
        network - the name of the network to connect to
        container - the name of the container to connect to the network
        Returns:
        a new Network.Connect command.
      • disconnect

        public static Network.Disconnect disconnect​(String network,
                                                    String container)
        Connect a container to a Docker network.
        Parameters:
        network - the name of the network to connect to
        container - the name of the container to connect to the network
        Returns:
        a new Network.Connect command.
      • inspect

        public static Network.Inspect inspect​(String... names)
        Inspect the specified networks.
        Parameters:
        names - the names of the networks to inspect
        Returns:
        a new Network.Inspect
      • inspect

        public static javax.json.JsonValue inspect​(com.oracle.bedrock.runtime.Platform platform,
                                                   Docker environment,
                                                   String... networks)
        Execute an Network.Inspect command on the specified Platform using the specified Docker environment.
        Parameters:
        platform - the Platform to use to execute the command
        environment - the Docker environment to use
        networks - the names of the networks to inspect
        Returns:
        a JsonArray containing the results of the inspect command
      • list

        public static Network.LS list()
        List the available Docker networks,
        Returns:
        a new Network.LS command.
      • remove

        public static Network.Remove remove​(String... names)
        Remove one or more Docker networks.
        Parameters:
        names - the names of the network to remove
        Returns:
        a new Network.Remove command.
      • remove

        public static Network.Remove remove​(List<String> names)
        Remove one or more Docker networks.
        Parameters:
        names - the names of the network to remove
        Returns:
        a new Network.Remove command.