79625971

Date: 2025-05-16 21:50:35
Score: 0.5
Natty:
Report link

Yes, it can be using subpath while mounting a volume subdirectory to a container. However,

To create a volume with subfolders, I made a utility function for me to use. I do:

# source the function
source create_volume_with_folders.sh 
# create a new volume with however many folders you want
create_volume_with_folders home_data pgadmin pgdata

After that, pay attention to setting external=True for the volume in docker compose file. See from my create_volume_with_folders.sh Gist.

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: metinsenturk