How to access docker network from another docker network (one way access)

Viewed 34

I have a docker-compose.yml file that look like that

version: '3.1'

services:
  core-gateway:
    image: boxs-gateway
    networks:
      - core
      - seperated-network

  core-auth:
    image: boxs-auth
    networks:
      - core

  unsecure-service:
    image: unsecure-image
    networks:
      - seperated-network

How can I make the boxs-gateway container access the unsecure-service in a way that the unsecure-service will not be able to access the core-auth service?

In other words, How can I configure the networks to do that?

0 Answers
Related