Question from the Docker compose test

Connect a service to a network in Docker Compose

Easy

Consider the following content in a docker-compose.yml :

services:
  web:
    image: nginx
    networks:
      - mynet
networks:
  mynet:
    driver: bridge

What does the networks field do under the web service?

Author: Thibault LacrouxStatus: Published(Update)Question passed 208 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!