Here is the official list of docker environment variables:
The following variables mention session:
OWNCLOUD_REDIS_SESSION_LOCKING_ENABLED 1
OWNCLOUD_REDIS_SESSION_LOCK_RETRIES 750
OWNCLOUD_REDIS_SESSION_LOCK_WAIT_TIME 20000
OWNCLOUD_SESSION_KEEPALIVE
OWNCLOUD_SESSION_LIFETIME
OWNCLOUD_SESSION_SAVE_HANDLER files
OWNCLOUD_SESSION_SAVE_PATH ${OWNCLOUD_VOLUME_SESSIONS}
So in order to enable it you need to overwrite the following variables like so:
OWNCLOUD_SESSION_SAVE_HANDLER=redis
OWNCLOUD_SESSION_SAVE_PATH=tcp://redis:6379
This only works if your redis server is available to your docker container as redis
(e.g defined as this name in your docker-compose).
This documentation is waaay outdated, current version is 10.9.1:
To find out what this environment variable actually does, just search for it in the docker base repository:
As you can see in the following file, all this environment variable does is enable Redis for file locking and ownCloud internal caching:
It is still mandatory to be enabled in order to have a fully supported ownCloud setup.