0

I'm new to mounts and overlayfs. Is it possible to put upperdir under lowerdir? e.g.

volumes:
  app:
    driver: local
    driver_opts:
      type: overlay
      o: lowerdir=${PWD},upperdir=${PWD}/docker/storage,workdir=/tmp/workdir
      device: overlay

(I'm copying the example from here)

The reason I want to do this is to keep the data co-located with my project.

1 Answer 1

0
  phpmyadminvol:
    driver: local
    driver_opts:
      type: "overlay"
      o: "lowerdir=${PWD}/ro-data,upperdir=${PWD}/upper1,workdir=${PWD}/work1"
      device: "overlay"

https://stackoverflow.com/a/58770954/5155484

This did work for me.

2
  • Yeah, but they're not nested like in my question :-) I basically did what you did. Had to restructure my directories, moving all my source code one level deeper.
    – mpen
    Commented Jun 10, 2020 at 20:53
  • 1
    Sure, I did TLDR the question and posted what works for me. Sorry for that :) Commented Jun 10, 2020 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .