Skip to content

Should not create network when running a container with network_mode: "none" #5740

@ebuildy

Description

@ebuildy

Given the following docker-compose:

version: "2"

services:

  maven:
    image: maven:3.5-jdk-8
    command: "ls "
    network_mode: "none"

  http:
    image: http
    command: "ls "

Running docker-compose -p toto run --rm maven ls is creating a network Creating network "toto_default" with the default driver.

Issue: docker-compose should not create a network when running a container that has no network!

Note: I can see a network is not created if all containers have network_mode: "none"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions