Code Monkey home page Code Monkey logo

Comments (10)

netbrain avatar netbrain commented on June 14, 2024 1

from zwift.

quietvoid avatar quietvoid commented on June 14, 2024 1

I ran into the same thing with a fresh image and Docker volume, because the volume is mounted as root by default.
So before installing Zwift I run sudo chown user:user "$HOME/Zwift" now, in the entrypoint.

from zwift.

henningf3 avatar henningf3 commented on June 14, 2024

Thanks for your answer!
I just double-checked to be sure that my user is part of docker-group, it is.
Since docker was a fresh installation, I can also preclude that running former commands with sudo broke something.
After reading a bit about podman, I would agree that this is the option of choice here. Probably the issues would not have emerged.

from zwift.

netbrain avatar netbrain commented on June 14, 2024

The container used to mount to $HOME/.zwift-$USER (or something along those lines), i think this fashion of mounting is called a bind mount , but due to people having permission issues on the host file system i changed this to a named volume instead which should be handled within the container itself. The reasoning behind this would be that it should prevent these kind of permission issues, but it seems it hasn't removed them completely.

Im also not sure if a VOLUME directive in the dockerfile would do anything to force such a named volume to be created with the proper user and group as set through the USER directive.

I'm already spending way too much time on this sideproject, so i'm not going to actively pursue this issue myself, but ill follow along and help if i can.

from zwift.

nabadger avatar nabadger commented on June 14, 2024

I have this issue too and worked around it by not using the named volume.

docker run --privileged -e DISPLAY=:0 \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /run/user/1000/pulse:/run/user/1000/pulse \
  -v /home/$USER/Zwift:/home/user/Zwift \               # <--- this line here 
  --device /dev/dri:/dev/dri docker.io/netbrain/zwift:latest

Prior to this I noticed that if you set the entrypoint --entrypoint=wineconsole and attempt to create a dir in the Zwift folder you get a permissions issue, so I suspect it's the permissions on the volume.

zwift-perm-issue

Ubuntu 22.04.2 LTS / Docker version 23.0.1, build a5ee5b1

from zwift.

netbrain avatar netbrain commented on June 14, 2024

@nabadger can you create a reproducible recipe for this permission error? In that case I can try to reproduce it locally.

from zwift.

KPLauritzen avatar KPLauritzen commented on June 14, 2024

I had the same issue as @henningf3, running on fresh install of Debian 12. Solved with

sudo chown -R $USER:$USER /var/lib/docker/volumes/zwift-$USER

from zwift.

SvenGrandcentrix avatar SvenGrandcentrix commented on June 14, 2024

For the statistics: I had this very issue on Ubuntu 23.10.
My solution was to remove the existing swift image from docker, than

sudo chown -R $USER:$USER /var/lib/docker/volumes/zwift-$USER

followed by the usual

zwift

created the file system with the correct rights and Zwift started.

from zwift.

FlorMaye avatar FlorMaye commented on June 14, 2024

I had the same permission error when starting zwift, and the "sudo chown -R $USER:$USER /var/lib/docker/volumes/zwift-$USER" command at beginning of installation did not really change anything.

I could solve the problem by changing the permission of /var/run/docker.sock to ‘666‘

Follow this instruction here https://www.baeldung.com/linux/docker-permission-denied-daemon-socket-error

Not sure if this is a good way but at least it works ad I can start zwift from the docker image.

from zwift.

nlavalle avatar nlavalle commented on June 14, 2024

Adding onto this, I think my situation might be slightly different since my version is opting to use podman instead of docker, here's the message if this helps:

Copying config 9ef1b18912 done  
Writing manifest to image destination
Storing signatures
9ef1b18912735a62b0d371c7a2cad4e41a4d31df545f0782b346ed81a364a7c1
+ [[ -f /proc/driver/nvidia/version ]]
+ VGA_DEVICE_FLAG='--gpus all'
+++ '[' podman = podman ']'
+++ echo --userns=keep-id
++ podman run -d --rm --privileged -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-gloom_tenacity:/home/user/Zwift --userns=keep-id --gpus all docker.io/netbrain/zwift:latest
Error: make `/home/gloom_tenacity/.local/share/containers/storage/overlay/c6b3aeca7712505516df67dd40026347a2eccd28732795931934bbb209e519de/merged` private: Permission denied: OCI permission denied
+ CONTAINER=
+ [[ -z '' ]]
++ podman inspect '--format={{ .Config.Hostname  }}'
Error: no names or ids specified
+ xhost +local:
non-network local connections being added to access control list

first time using this I did the install.sh bash command from the readme then tried to run zwift.

edit: sudo zwift didn't work either, but copying the podman run command and running that as sudo did start up the app, fwiw.

from zwift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.