felddy / foundryvtt-docker

An easy-to-deploy Dockerized Foundry Virtual Tabletop server.
https://hub.docker.com/r/felddy/foundryvtt
MIT License
616 stars 117 forks source link

Can't isolate the container with docker namespace #1080

Closed CaosFR closed 1 month ago

CaosFR commented 1 month ago

Bug description

I use namespace for isolate my containers but I can't start FoundryVTT if I use docker namespace. I have a error like ' chown "Operation not permitted" ' (on all the data repertory) on the startup when (I think) it try to bind my local data to the container.

Thanks for your help

Steps to reproduce

$ nano /etc/docker/daemon.json { "userns-remap": "default", }

$ systemctl daemon-reload $ systemctl restart docker

$ docker-compose up [...] Start [...] foundry | chown: /data/[...]: Operation not permitted

Expected behavior

I don't want to use "userns_mode: host" in my docker-compose for bypass my configuration. In this case the contenair is launch with privilege (it's a secrurity issue). user: foundry:foundry (or root) in docker-compose dont solve the problem.

Container metadata

com.foundryvtt.version = "12.331"
org.opencontainers.image.authors = "markf+github@geekpad.com"
org.opencontainers.image.created = "2024-08-16T01:48:32.610Z"
org.opencontainers.image.description = "An easy-to-deploy Dockerized Foundry Virtual Tabletop server."
org.opencontainers.image.licenses = "MIT"
org.opencontainers.image.revision = "61a1ac11d7bd298b93fa6cebb102158ddb1d020e"
org.opencontainers.image.source = "https://github.com/felddy/foundryvtt-docker"
org.opencontainers.image.title = "foundryvtt-docker"
org.opencontainers.image.url = "https://github.com/felddy/foundryvtt-docker"
org.opencontainers.image.vendor = "Geekpad"
org.opencontainers.image.version = "12.331.0"

Relevant log output

Attaching to foundry
foundry    | Entrypoint | 2024-10-09 16:38:04 | [info] Starting felddy/foundryvtt container v12.331.0
foundry    | Entrypoint | 2024-10-09 16:38:05 | [info] Reading configured secrets from: XXX
foundry    | Entrypoint | 2024-10-09 16:38:05 | [info] No Foundry Virtual Tabletop installation detected.
foundry    | Entrypoint | 2024-10-09 16:38:05 | [info] Using XXX and XXX to authenticate.
foundry    | Authenticate | 2024-10-09 16:38:05 | [info] Requesting CSRF tokens from https://foundryvtt.com
foundry    | Authenticate | 2024-10-09 16:38:06 | [info] Logging in as: XXX
[...]
foundry    | chown: /data/Data/modules/simple-dice-roller: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/module.json: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/lang: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/lang/es.json: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/lang/fr.json: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/lang/en.json: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.css: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.html: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.svg: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.woff: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.eot: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/simple-dice-roller.css: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/css/dicefont.ttf: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/README.md: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/simple-dice-roller.js: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/.gitignore: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/.vscode: Operation not permitted
foundry    | chown: /data/Data/modules/simple-dice-roller/.vscode/settings.json: Operation not permitted
foundry    | chown: /data/Backups: Operation not permitted
foundry    | chown: /data/Backups/worlds: Operation not permitted
foundry    | chown: /data/Backups/worlds/XXX: Operation not permitted
foundry    | chown: /data/container_cache: Operation not permitted
foundry    | chown: /data/container_cache/foundryvtt-12.331.zip: Operation not permitted
[...]

Code of Conduct

CaosFR commented 1 month ago

Solved with a simple 'chown foundry:docker' to my local data folder