0

Docker is storing data in volumes under /var/lib/docker/volumes/ on my host machine. There is no more space on this disk. I want docker to store all the data at a new location on the host. I thought the following docker-compose file would work:

services:

  myservice:
    image: <image>
    container-name: myservice
    ports:
      - 5000:5000
    volumes:
      myservicevolume:/

volumes:
  myservicevoume:/mounts/bigdisk3/myservice

But I get this error:

volumes must be a mapping, not a string.

Using docker-compose file, how to have all data for a service stored on a specific disk?

guesty
  • 95
  • 2
  • 10

0 Answers0