Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not working on podman #1167

Open
1 task done
DawidIzydor opened this issue Feb 16, 2025 · 2 comments
Open
1 task done

Image not working on podman #1167

DawidIzydor opened this issue Feb 16, 2025 · 2 comments

Comments

@DawidIzydor
Copy link
Contributor

Bug description

When running the image through podman I'm getting this error:

FoundryVTT | 2025-02-16 13:19:00 | [info] User Data Directory - "/data"
FoundryVTT | 2025-02-16 13:19:00 | [error] A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'
Error: A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'

Using the exact same config with Docker works fine

Here's my config

---
services:
  foundry:
    image: felddy/foundryvtt:12
    container_name: foundry_12
    networks:
        nginx-proxy:
    init: true
    volumes:
      - type: bind
        source: ...
        target: /data
    environment:
      # use to override the container version
      - FOUNDRY_VERSION=12.331
      
      # use to download new foundry version
      - FOUNDRY_PASSWORD=...
      - FOUNDRY_USERNAME=...
      
      # admin key don't need to change
      - FOUNDRY_ADMIN_KEY=...

      - FOUNDRY_LICENSE_KEY=...
      - FOUNDRY_HOSTNAME=...
      - FOUNDRY_PROXY_PORT=443
      - FOUNDRY_PROXY_SSL=true
      
      # reverse proxy settings
      - VIRTUAL_HOST=...
      - VIRTUAL_PORT=...
      - VIRTUAL_PROTO=...
      - LETSENCRYPT_HOST=...
      - CONTAINER_PRESERVE_OWNER=...
      - CONTAINER_PRESERVE_CONFIG=...
      - CONTAINER_VERBOSE=...

    expose:
        - 30000
        - 9100
    restart: unless-stopped
    privileged: true # on Docker works without privileged, on podman neither setting works


networks:
    nginx-proxy:
        external: true

Steps to reproduce

Run the image through podman, the app won't start

Expected behavior

The container works correctly

Container metadata

docker inspect --format='{{range $k, $v := .Config.Labels}} {{- printf "%s = \"%s\"\n" $k $v -}} {{end}}' felddy/foundryvtt:release
template parsing error: template: :1: unexpected "%" in operand

Relevant log output

Entrypoint | 2025-02-16 13:18:58 | [info] Foundry Virtual Tabletop 12.331 is installed.
Entrypoint | 2025-02-16 13:18:58 | [info] Not modifying existing installation license key.
Entrypoint | 2025-02-16 13:18:58 | [info] Setting data directory permissions.
Entrypoint | 2025-02-16 13:18:58 | [debug] Setting ownership of /data to foundry:foundry.
Entrypoint | 2025-02-16 13:18:58 | [debug] Completed setting directory permissions.
Entrypoint | 2025-02-16 13:18:58 | [info] Starting launcher with uid:gid as foundry:foundry.
Entrypoint | 2025-02-16 13:18:58 | [debug] Waiting for child pid: 27 to exit.
Launcher | 2025-02-16 13:18:58 | [debug] Ensuring /data/Config directory exists.
Launcher | 2025-02-16 13:18:58 | [warn] CONTAINER_PRESERVE_CONFIG is set: Not updating options.json
Launcher | 2025-02-16 13:18:58 | [warn] CONTAINER_PRESERVE_CONFIG is set: Not updating admin.txt
Launcher | 2025-02-16 13:18:58 | [info] Starting Foundry Virtual Tabletop.
FoundryVTT | 2025-02-16 13:18:59 | [info] Running on Node.js - Version 18.20.3
FoundryVTT | 2025-02-16 13:18:59 | [info] Foundry Virtual Tabletop - Version 12 Build 331
FoundryVTT | 2025-02-16 13:18:59 | [info] User Data Directory - "/data"
�FoundryVTT | 2025-02-16 13:18:59 | [error] A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'
�Error: A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'
Entrypoint | 2025-02-16 13:19:00 | [debug] Timezone set to: UTC
Entrypoint | 2025-02-16 13:19:00 | [info] Starting felddy/foundryvtt container v12.331.0
Entrypoint | 2025-02-16 13:19:00 | [debug] CONTAINER_VERBOSE set.  Debug logging enabled.
�Entrypoint | 2025-02-16 13:19:00 | [debug] Running as: uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
Entrypoint | 2025-02-16 13:19:00 | [debug] Environment:
CONTAINER_PRESERVE_CONFIG=true
CONTAINER_PRESERVE_OWNER=.*
CONTAINER_VERBOSE=true
FOUNDRY_ADMIN_KEY=[REDACTED]
FOUNDRY_HOME=/home/foundry
FOUNDRY_HOSTNAME=[REDACTED]
FOUNDRY_LICENSE_KEY=[REDACTED]
FOUNDRY_PASSWORD=[REDACTED]
FOUNDRY_PROXY_PORT=443
FOUNDRY_PROXY_SSL=true
FOUNDRY_USERNAME=[REDACTED]
FOUNDRY_VERSION=12.331
HOME=/root
HOSTNAME=029df8909671
LETSENCRYPT_HOST=[REDACTED]
NODE_VERSION=18.20.3
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/home/foundry
SHLVL=1
VIRTUAL_HOST=[REDACTED]
VIRTUAL_PORT=30000
VIRTUAL_PROTO=http
YARN_VERSION=1.22.19
container=podman
Entrypoint | 2025-02-16 13:19:00 | [info] Foundry Virtual Tabletop 12.331 is installed.
Entrypoint | 2025-02-16 13:19:00 | [info] Not modifying existing installation license key.
Entrypoint | 2025-02-16 13:19:00 | [info] Setting data directory permissions.
Entrypoint | 2025-02-16 13:19:00 | [debug] Setting ownership of /data to foundry:foundry.
Entrypoint | 2025-02-16 13:19:00 | [debug] Completed setting directory permissions.
Entrypoint | 2025-02-16 13:19:00 | [info] Starting launcher with uid:gid as foundry:foundry.
Entrypoint | 2025-02-16 13:19:00 | [debug] Waiting for child pid: 27 to exit.
Launcher | 2025-02-16 13:19:00 | [debug] Ensuring /data/Config directory exists.
Launcher | 2025-02-16 13:19:00 | [warn] CONTAINER_PRESERVE_CONFIG is set: Not updating options.json
Launcher | 2025-02-16 13:19:00 | [warn] CONTAINER_PRESERVE_CONFIG is set: Not updating admin.txt
Launcher | 2025-02-16 13:19:00 | [info] Starting Foundry Virtual Tabletop.
FoundryVTT | 2025-02-16 13:19:00 | [info] Running on Node.js - Version 18.20.3
FoundryVTT | 2025-02-16 13:19:00 | [info] Foundry Virtual Tabletop - Version 12 Build 331
FoundryVTT | 2025-02-16 13:19:00 | [info] User Data Directory - "/data"
�FoundryVTT | 2025-02-16 13:19:00 | [error] A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'
�Error: A fatal error occurred while trying to start the Foundry Virtual Tabletop server: EPERM: operation not permitted, utime '/data/Config/options.json.lock'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@felddy
Copy link
Owner

felddy commented Feb 16, 2025

This is a permissions issue. The user you are using does not have permission to read the options.json.lock file. The works in Docker is because you are running as root. You can fix this issue by setting the correct ownership, or permissions of the mounted volume to match the user that you are using to run Podman.

Version 12 of the container does not explicitly support Podman, but it is has been reported to work: #621.

As of release 13.333.0 of the container the container should be more compatible with Podman. i.e., it no longer assumes it could have root privileges, and uses the default node user of the base image.

So, you could either:

  • use the :13 image tag with FOUNDRY_VERSION set to 12.331, or
  • correct the permission on the mounted volume.

I hope this helps. Let me know if you resolve it, or run into other issues.

See:

@DawidIzydor
Copy link
Contributor Author

I've tried to use privileged: true but the result was the same. I'm running this container on Windows, so not sure what permissions I should add - for Docker I didn't need to add anything.

Additionally, I've run podman run -it --rm -v ./data:/data docker.io/library/alpine:latest /bin/sh and was able to operate on the same folder from within it without adding any permissions:

PS E:\Docker\Foundry12> podman run -it --rm -v ./data:/data docker.io/library/alpine:latest /bin/sh
/ # cd /data
/data # cd Config/
/data/Config # ls
admin.txt  license.json  options.json
/data/Config # touch options.json.lock
/data/Config # ls
admin.txt  license.json  options.json  options.json.lock

Maybe there's some kind of issue with the filesystem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants