Thank you for your answer.
This is a great idea.
Unfortunately, our exploitation zone and current architecture does not 
allow this.
The whole disk where is stored catalogs and TDS conf files is read-only 
(for containers).
This is why I wanted to split the content folder, catalogs on one side 
and cache/logs on another.
I already configured the log path in the *log4j* conf file.
About the cache, for the moment I defined the *<dir>* attribute in 
*threddsConfig.xml* for each cache.
Kind regards,
Enzo
On 10/08/2023 09:25, Christian Skarby wrote:
Good morning,
A possibility would also be to mount the configuration directory as a 
read-only volume, and mount a second directory as writable in the 
subdirectory named cache.
/ read-only container rootfs
/home/tomcat/content/thredds read-only
/home/tomcat/content/thredds/cache writable
Consider the following as pseudo code to illustrate one way to 
accomplish this when starting a container instance with the docker 
command line:
docker run --read-only -v 
/host/tds-config:/home/tomcat/content/thredds:ro -v 
/host/tds-cache:/home/tomcat/content/thredds/cache:rw container-image
Notice that there also are other directories beneath the configuration 
directory that TDS expects to be writable, e.g. logs etc. TDSv5 also 
populates the content directory with example files that it cannot find 
during startup. You need to put your own files there in advance or 
just use "touch" to create empty files for the paths of the example 
files before starting TDS to avoid TDSv5 to crash on startup.
--
Regards
Christian Skarby
devops
MET Norway
tor. 10. aug. 2023 kl. 09:05 skrev Ifremer <enzo.pauvy@xxxxxxxxxx>:
    Dear all,
    On Thredds 4.6, is there any way to change the cache directory,
    other than defining a symlink?
    I would like a read-only folder for my content directory, mounted
    as a volume for my dockered Thredds.
    According to TDS Configuration file
    
<https://docs.unidata.ucar.edu/tds/4.6/adminguide/reference/ThreddsConfigXMLFile.html>,
    I can define a directory for each cache.
    But it would be easier to redefine a single path, right?
    Kind regards,
    Enzo
    _______________________________________________
    NOTE: All exchanges posted to Unidata maintained email lists are
    recorded in the Unidata inquiry tracking system and made publicly
    available through the web.  Users who post to any of the lists we
    maintain are reminded to remove any personal information that they
    do not want to be made public.
    thredds mailing list
    thredds@xxxxxxxxxxxxxxxx
    For list information or to unsubscribe,  visit:
    https://www.unidata.ucar.edu/mailing_lists/