How do share-config-custom.xml get generated?

Showing results for 
Search instead for 
Did you mean: 
Active Member

How do share-config-custom.xml get generated?


I'm using a custom docker-image for share that uses the standard share image + some customized jars. I noticed that the file share-config-custom.xml already exists or gets generated if it does not. When comparing it to an earlier alfresco installation I noticed that the newer one had <config condition="CSRFPolicy"> while the older one did not.

Of course I can just include my own share-config-custom.xml and replace it in the Dockerfile before creating the custom image. But if it is generated when missing I'm afraid of missing potential new standard settings in future versions of the base image. Hence my question.

Also, is there a complete list of possible config conditions somewhere? (also is there a list for possible properties in




1 Reply
Active Member

Re: How do share-config-custom.xml get generated?

I found the answer, so I'll leave this here if anyone else comes across the same question.

Basically a share-config-custom.xml is included in the standard build of share (

This then gets copied in the Dockerfile for building share (

Then it runs to use the env specified when launching the container  ( (Which explains why the documentation specifies these here under share: )

In the, a sed command is used to replace values in the share-config-custom.xml.

In my case I needed to further customize the share-config-custom.xml, and therefore I will add specific sed commands for dealing with this since there are no more available env settings. That way I will recieve any future updates to share-config-custom.xml when upgrading share to a newer version. If I just copy the customized share-config-custom.xml in my own custom Dockerfile, I will need to check for any updates to it myself. But I'd rather not deal with that overhead. 

Hope it helps someone! Smiley Happy