Docker Community Forums

Share and learn in the Docker community.

Newbie Question on Volumes


(Cpmiller22) #1

HI all-

I’m just getting started with Docker-CE running on Ubuntu 18. Have a few containers up and running a things are going well. In my server I have a 500gb ssd, and a 500gb spin drive. Docker is setup on /var/lib/docker, so all my volumes get created there (which is on the SSD). I’m setting up a graylog logging container using their sample yml file, but I would like the volume to be stored on my spin drive which is mounted at /mnt/data. Can someone help point me in the right direction. Here is a snipet from the yml file:

services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongodb:
    image: mongo:3
    volumes:
      - mongo_data:/data/db
.
.
.
volumes:
  mongo_data:
    driver: local