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

Docker for Windows Permissions Issues #501

Open
Skyl3lazer opened this issue Oct 16, 2024 · 1 comment
Open

Docker for Windows Permissions Issues #501

Skyl3lazer opened this issue Oct 16, 2024 · 1 comment

Comments

@Skyl3lazer
Copy link

Skyl3lazer commented Oct 16, 2024

Good morning,

I'm trying to get this to run through docker for windows. This is my docker compose.

version: '3'
services:
    factorio:
      image: factoriotools/factorio
      restart: unless-stopped
      container_name: factorio
      ports:
        - "34197:34197/udp"
        - "27015:27015/tcp"
      volumes:
       - factorio_volume:/factorio:Z
       - W:\docker\factorio\server-settings.json:/server-settings.json
      environment:
        - INSTANCE_NAME=SkyFactorio
        - INSTANCE_DESC=Skyl3lazer's Factorio Server
        - LOAD_LATEST_SAVE=true
      entrypoint: /bin/sh -c "mkdir -p /factorio/config && envsubst < /server-settings.json > /factorio/config/server-settings.json && exec /docker-entrypoint.sh"
volumes:
    factorio_volume:
        driver: local
        driver_opts:
          o: bind
          type: none
          device: W:\docker\factorio\game

When I run this unfortunately I get a spam of permissions errors which I imagine is related to permissions differences between windows and linux, but I can't figure out why. Docker should give the volume 0777. I see the dockerfile runs the necessary chown commands, what else has to happen on my end?

Here's a sample of the sort of stuff I see.

factorio  |    0.495 Error FileUtil.cpp:467: Couldn't remove /factorio/temp/currently-playing/locale/de: Permission denied
factorio  |    0.499 Warning FileUtil.cpp:444: Permission denied trying to remove /factorio/temp/currently-playing/locale/el. Will set write permissions and try again
factorio  |    0.501 Error FileUtil.cpp:467: Couldn't remove /factorio/temp/currently-playing/locale/el: Permission denied
factorio  |    0.504 Warning FileUtil.cpp:444: Permission denied trying to remove /factorio/temp/currently-playing/locale/en. Will set write permissions and try again
factorio  |    0.506 Error FileUtil.cpp:467: Couldn't remove /factorio/temp/currently-playing/locale/en: Permission denied```
@Skyl3lazer
Copy link
Author

I've also updated the permissions on the shared volume, and confirm I can see them if I attach to the container. Note that the factorio folder is correctly owned by the factorio user.

image

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

No branches or pull requests

1 participant