Docker Community Forums

Share and learn in the Docker community.

Docker network --subnet on MacOS and Docker-Desktop

Hello there :raising_hand_man:

I can’t access my http-service on 192.168.70.8 which I expose by a docker-compose file, I guess it struggles with my subnet my-subnet which I created by:

docker network create --subnet 192.168.70.0/24 my-subnet
version: '3'

services:
  web:
    image: nginx
    networks:
      my-subnet:
        ipv4_address: 192.168.70.8

networks:
  my-subnet:
    external: true

I guess there is some extra step which I need to do on MacOS with this Docker-Desktop?
On my Ubuntu 20 everything works fine.