public String getStandardMode(String containerId) {
        if (isCustomNetwork()) {
            throw new IllegalArgumentException("Custom network for network '" + name +
                                               "' can not be used as standard mode");
        }
        if (mode == null) {
            return null;
        }
        return mode.name().toLowerCase() + (mode == Mode.container ? ":" + containerId : "");
    }
Legacy constructor using the &lt;net&gt; config
@param net net, encapsulating mode &amp; name.
src/main/java/io/fabric8/maven/docker/config/NetworkConfig.java