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.

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.

| improve this answer | |
  • 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 Jun 10 at 20:53
  • 1
    Sure, I did TLDR the question and posted what works for me. Sorry for that :) – William Desportes Jun 10 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.