Follow the steps below,
-
Create a Docker volume for managing data persistence by issuing the host shell command:
docker volume create log-agent-log
-
To initialize data in this volume, issue the host shell command:
docker run --user root --rm -ti -v log-agent-log:/tmp/log-agent-log alpine /bin/sh -c "chown -R 100:101 /tmp/log-agent-log; chmod -R 755 /tmp/log-agent-log"