Closed josecelano closed 1 month ago
The new docker configuration requires executing the container as root. We can't pass this argument: --user="$USER_ID" \
.
cd /tmp \
&& mkdir torrust-index \
&& cd torrust-index \
&& export USER_ID=1000 \
&& docker run -it \
--env USER_ID="$USER_ID" \
--publish 3001:3001/tcp \
--volume "$(pwd)/storage/index/lib":"/var/lib/torrust/index" \
--volume "$(pwd)/storage/index/log":"/var/log/torrust/index" \
--volume "$(pwd)/storage/index/etc":"/etc/torrust/index" \
torrust/index:develop
You can also create the needed folder manually:
cd /tmp \
&& mkdir torrust-index \
&& cd torrust-index \
&& mkdir -p ./storage/index/lib/database \
&& mkdir -p ./storage/index/log \
&& mkdir -p ./storage/index/etc \
&& sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;" \
&& export USER_ID=1000 \
&& docker run -it \
--env USER_ID="$USER_ID" \
--publish 3001:3001/tcp \
--volume "$(pwd)/storage/index/lib":"/var/lib/torrust/index" \
--volume "$(pwd)/storage/index/log":"/var/log/torrust/index" \
--volume "$(pwd)/storage/index/etc":"/etc/torrust/index" \
torrust/index:develop
We have to update the docs: https://docs.rs/torrust-index/3.0.0-rc.1/torrust_index/#run-with-docker
Parent issue: https://github.com/torrust/torrust-index/issues/738 Source: https://docs.rs/torrust-index/latest/torrust_index/index.html#run-with-docker