79646734

Date: 2025-05-31 15:13:13
Score: 0.5
Natty:
Report link

An approach I tend to prefer more is by specifying the container's name (network_mode):

services:
  mycontainer1:
    image: myregistry/my-container1:latest
    ports: ['6666:7777']
  mycontainer2:
    image: myregistry/my-container2:latest
    network_mode: container:mycontainer1     # <---
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mattia Baldari