Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Discussion options

You must be logged in to vote

Your line must start with a string, which is done with -.

You can reference directly to a (1) source directory or use (2) docker volumes, where actual data is then stored under /usr/lib/docker/volumes.

(1):
The compose file would look like this (beware of sufficient whitespaces!)

version: "3.9"

services:
  db:
    image: db
    volumes:
      - /path/to/folder:/var/lib/db

(2):
This one is referencing the path again at the end of the compose file.

version: "3.9"

services:
  db:
    image: db
    volumes:
      - data-volume:/var/lib/db

volumes:
  data-volume:

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@cjax82
Comment options

Comment options

You must be logged in to vote
1 reply
@cjax82
Comment options

Answer selected by cjax82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants