Docker environment variable empty in Sitecore patch file

238 Views Asked by At

Following this document: https://doc.sitecore.com/en/developers/101/developer-tools/sync-items-with-a-running-container.html, I tried to set the sourceFolder variable in a Sitecore patch config file as follows:

<sc.variable name="sourceFolder" value="$(env:ITEM_SYNC_LOCATION)" />

and I deployed the Sitecore 10.1 solution (with the above configuration) to the CM Docker container based on Windows Server image. The sourceFolder variable is always empty, even though the ITEM_SYNC_LOCATION environment variable exists in the container and has the value specified in the docker-compose.yml file:

  cm:
    [...]
    environment:
      ITEM_SYNC_LOCATION: c:\items-mounted
    volumes:
      - ${LOCAL_ITEM_PATH}:c:\items-mounted

I have performed several reboots of the CM container but the problem persists. What could I have missed?

0

There are 0 best solutions below