Question from the Docker compose test

How to use volumes in Docker Compose

Easy

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

services:
  db:
    image: postgres
    volumes:
      - db_data:/var/lib/postgresql/data
volumes:
  db_data:

What does the volumes field do under the db service?

Author: AxelStatus: PublishedQuestion passed 230 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!