netbrain / zwift

Easily zwift on linux
The Unlicense
238 stars 27 forks source link

Latest update require wine to run the docker image #80

Closed nowave7 closed 5 months ago

nowave7 commented 5 months ago

Describe the bug The update to the image done on 01.04.2024 suddenly requires wine/wine-mono to be installed on the machine.

To Reproduce Steps to reproduce the behavior: run zwift as normal

Expected behavior Zwift image should start and it should run normally

Screenshots image

Additional context System details, even though it ran just a few days ago, and no changes were done to the host system: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic

Linux xxxx-OptiPlex-9020 6.5.0-26-generic #26-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 5 21:19:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Selecting the install doesn't seem to have any effect.

nowave7 commented 5 months ago

Could be related to the latest image? image

nowave7 commented 5 months ago

Oh, one more question, how to specify the image VERSION in the zwift.sh file? Obviously, latest works, but say an image that is a few days old?

quietvoid commented 5 months ago

You can try setting the VERSION environment variable. Like so:

VERSION=1.60.0 zwift.sh

I think the updater scripts would override previous image tags.

nowave7 commented 5 months ago

Thanks, found it... Well, one can also set DONT_PULL, so that should be fine, or even better change the VERSION in the starting script. Just as a quick confirmation, version 1.60.0 is working fine.

quietvoid commented 5 months ago

1.61.0 works fine for my locally built image FWIW. Maybe @netbrain needs to rebuild the image and install wine-mono.

nowave7 commented 5 months ago

Hmm... That is strange. I did stop all the containers, and deleted all of the images, re-downloaded the latest one, still the same behavior.

jdohm commented 5 months ago

if I click install, at the Wine Mono Installer, I get the following screen later:

Screenshot_20240402_130012

Wine Mono seems to be already included in the docker image: https://github.com/netbrain/zwift/blob/24ac8264fb99dbd52399022d478bb3ac72ab1cd8/Dockerfile#L82

I noticed that afterwards there is a Zwift icon in my tray. If i right click it and click on open, I get an error message, telling me that WebView2 needs to be installed. Sadly that is as far as I got.

For the moment I'm also using a workaround, I changed line 8 in the /usr/local/bin/zwift file to VERSION=1.60.0

1.61.0 did not work for me.

netbrain commented 5 months ago

Has anyone tried building the latest locally using bin/build_image.sh?

jdohm commented 5 months ago

just tried, but fails for me. However, this could be something completely unrelated since I have never build it in the past...

[jannis@jannis-kubuntu ~/github/zwift]$ ./bin/build-image.sh 
+ set -e
+ [[ -f /proc/driver/nvidia/version ]]
+ VGA_DEVICE_FLAG='--device /dev/dri:/dev/dri'
+ docker build -t netbrain/zwift .
[+] Building 16.7s (10/31)                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                      0.0s
 => => transferring dockerfile: 3.48kB                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/debian:bookworm-slim                                                                                   1.6s
 => [internal] load metadata for docker.io/library/rust:1.72                                                                                              1.6s
 => [internal] load .dockerignore                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                           0.0s
 => [wine-base  1/10] FROM docker.io/library/debian:bookworm-slim@sha256:ccb33c3ac5b02588fc1d9e4fc09b952e433d0c54d8618d0ee1afadf1f3cf2455                 3.3s
 => => resolve docker.io/library/debian:bookworm-slim@sha256:ccb33c3ac5b02588fc1d9e4fc09b952e433d0c54d8618d0ee1afadf1f3cf2455                             0.0s
 => => sha256:ccb33c3ac5b02588fc1d9e4fc09b952e433d0c54d8618d0ee1afadf1f3cf2455 1.85kB / 1.85kB                                                            0.0s
 => => sha256:993f5593466f84c9200e3e877ab5902dfc0e4a792f291c25c365dbe89833411f 529B / 529B                                                                0.0s
 => => sha256:dd8416105e9e7aa94aa22d8839c4359a237cbcd30f8b464bd961cbba9fce8a54 1.46kB / 1.46kB                                                            0.0s
 => => sha256:8a1e25ce7c4f75e372e9884f8f7b1bedcfe4a7a7d452eb4b0a1c7477c9a90345 29.12MB / 29.12MB                                                          2.3s
 => => extracting sha256:8a1e25ce7c4f75e372e9884f8f7b1bedcfe4a7a7d452eb4b0a1c7477c9a90345                                                                 0.8s
 => CANCELED [build-runfromprocess 1/8] FROM docker.io/library/rust:1.72@sha256:911acdfd39276ead0dfb583a833f1db7d787ad0d5333848378d88f19e5fc158c         15.0s
 => => resolve docker.io/library/rust:1.72@sha256:911acdfd39276ead0dfb583a833f1db7d787ad0d5333848378d88f19e5fc158c                                        0.0s
 => => sha256:6a2ac38604fce995fd586c8d760147f71d9113dcbe84a7fcddcb30c60a1ec7ee 1.38kB / 1.38kB                                                            0.0s
 => => sha256:5789de4d5ecc8b55d521f243992f1b6493ced13a837fb5887859e50b72748a31 6.10kB / 6.10kB                                                            0.0s
 => => sha256:167b8a53ca4504bc6aa3182e336fa96f4ef76875d158c1933d3e2fa19c57e0c3 49.56MB / 49.56MB                                                          4.3s
 => => sha256:b47a222d28fa95680198398973d0a29b82a968f03e7ef361cc8ded562e4d84a3 24.03MB / 24.03MB                                                          3.1s
 => => sha256:911acdfd39276ead0dfb583a833f1db7d787ad0d5333848378d88f19e5fc158c 988B / 988B                                                                0.0s
 => => sha256:debce5f9f3a9709885f7f2ad3cf41f036a3b57b406b27ba3a883928315787042 64.11MB / 64.11MB                                                          8.4s
 => => sha256:1d7ca7cd2e066ae77ac6284a9d027f72a31a02a18bfc2a249ef2e7b01074338b 118.49MB / 211.04MB                                                       15.0s
 => => extracting sha256:167b8a53ca4504bc6aa3182e336fa96f4ef76875d158c1933d3e2fa19c57e0c3                                                                 1.7s
 => => sha256:2f47d826831b715d0a34a7f72c69942043b7e90e909e3e0565ebddaeec280c1a 135.27MB / 190.45MB                                                       15.0s
 => => extracting sha256:b47a222d28fa95680198398973d0a29b82a968f03e7ef361cc8ded562e4d84a3                                                                 0.6s
 => => extracting sha256:debce5f9f3a9709885f7f2ad3cf41f036a3b57b406b27ba3a883928315787042                                                                 2.1s
 => [internal] load build context                                                                                                                         0.0s
 => => transferring context: 6.59kB                                                                                                                       0.0s
 => [wine-base  2/10] RUN dpkg --add-architecture i386                                                                                                    0.3s
 => [wine-base  3/10] RUN echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list                                                       0.2s
 => ERROR [wine-base  4/10] RUN   apt-get update &&   apt-get install -y --no-install-recommends   sudo   wget   unzip   gnupg2   procps   winbind   pu  11.2s
------                                                                                                                                                         
 > [wine-base  4/10] RUN   apt-get update &&   apt-get install -y --no-install-recommends   sudo   wget   unzip   gnupg2   procps   winbind   pulseaudio   ca-certificates   libxau6 libxau6:i386   libxdmcp6 libxdmcp6:i386   libxcb1 libxcb1:i386   libxext6 libxext6:i386   libx11-6 libx11-6:i386   libglvnd0 libglvnd0:i386   libgl1 libgl1:i386   libglx0 libglx0:i386   libegl1 libegl1:i386   libgles2 libgles2:i386   libgl1-mesa-glx libgl1-mesa-glx:i386   libgl1-mesa-dri libgl1-mesa-dri:i386 &&   wget -qO - http://dl.winehq.org/wine-builds/winehq.key | apt-key add - &&   echo "deb https://dl.winehq.org/wine-builds/debian/ bookworm main" >   /etc/apt/sources.list.d/winehq.list &&   sed -i '/^Types: deb/{:a; N; /\n$/!ba; s/Suites: \(.*\)/Suites: bookworm \1/}' /etc/apt/sources.list.d/debian.sources &&   apt-get update &&   apt-get -y install --install-recommends   winehq-stable=8.0.2~bookworm-1   wine-stable=8.0.2~bookworm-1   wine-stable-amd64=8.0.2~bookworm-1   wine-stable-i386=8.0.2~bookworm-1 &&   rm -rf /var/lib/apt/lists/*:
0.384 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
0.425 Get:2 http://ftp.debian.org/debian sid InRelease [198 kB]
0.506 Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
0.544 Get:4 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
0.566 Get:5 http://deb.debian.org/debian bookworm/main amd64 Packages [8786 kB]
0.812 Get:6 http://ftp.debian.org/debian sid/main i386 Packages [9752 kB]
1.080 Get:7 http://deb.debian.org/debian bookworm/main i386 Packages [8679 kB]
1.557 Get:8 http://deb.debian.org/debian bookworm-updates/main i386 Packages [12.6 kB]
1.557 Get:9 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [12.7 kB]
1.558 Get:10 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [150 kB]
1.561 Get:11 http://deb.debian.org/debian-security bookworm-security/main i386 Packages [149 kB]
2.158 Get:12 http://ftp.debian.org/debian sid/main amd64 Packages [9908 kB]
5.681 Fetched 37.9 MB in 5s (6964 kB/s)
5.681 Reading package lists...
7.666 Reading package lists...
9.754 Building dependency tree...
10.18 Reading state information...
10.58 Some packages could not be installed. This may mean that you have
10.58 requested an impossible situation or if you are using the unstable
10.58 distribution that some required packages have not yet been created
10.58 or been moved out of Incoming.
10.58 The following information may help to resolve the situation:
10.58 
10.58 The following packages have unmet dependencies:
10.75  libgl1-mesa-dri:i386 : Depends: libllvm17t64:i386 but it is not installable
10.76 E: Unable to correct problems, you have held broken packages.
------
Dockerfile:26
--------------------
  25 |     
  26 | >>> RUN \
  27 | >>>   apt-get update && \
  28 | >>>   apt-get install -y --no-install-recommends \
  29 | >>>   sudo \
  30 | >>>   wget \
  31 | >>>   unzip \
  32 | >>>   gnupg2 \
  33 | >>>   procps \
  34 | >>>   winbind \
  35 | >>>   pulseaudio \
  36 | >>>   ca-certificates \
  37 | >>>   libxau6 libxau6:i386 \
  38 | >>>   libxdmcp6 libxdmcp6:i386 \
  39 | >>>   libxcb1 libxcb1:i386 \
  40 | >>>   libxext6 libxext6:i386 \
  41 | >>>   libx11-6 libx11-6:i386 \
  42 | >>>   libglvnd0 libglvnd0:i386 \
  43 | >>>   libgl1 libgl1:i386 \
  44 | >>>   libglx0 libglx0:i386 \
  45 | >>>   libegl1 libegl1:i386 \
  46 | >>>   libgles2 libgles2:i386 \
  47 | >>>   libgl1-mesa-glx libgl1-mesa-glx:i386 \
  48 | >>>   libgl1-mesa-dri libgl1-mesa-dri:i386 && \
  49 | >>>   wget -qO - http://dl.winehq.org/wine-builds/winehq.key | apt-key add - && \
  50 | >>>   echo "deb https://dl.winehq.org/wine-builds/debian/ bookworm main" > \
  51 | >>>   /etc/apt/sources.list.d/winehq.list && \ 
  52 | >>>   sed -i '/^Types: deb/{:a; N; /\n$/!ba; s/Suites: \(.*\)/Suites: bookworm \1/}' /etc/apt/sources.list.d/debian.sources && \
  53 | >>>   apt-get update && \
  54 | >>>   apt-get -y install --install-recommends \
  55 | >>>   winehq-stable=${WINE_VERSION} \
  56 | >>>   wine-stable=${WINE_VERSION} \
  57 | >>>   wine-stable-amd64=${WINE_VERSION} \
  58 | >>>   wine-stable-i386=${WINE_VERSION} && \
  59 | >>>   rm -rf /var/lib/apt/lists/*
  60 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update &&   apt-get install -y --no-install-recommends   sudo   wget   unzip   gnupg2   procps   winbind   pulseaudio   ca-certificates   libxau6 libxau6:i386   libxdmcp6 libxdmcp6:i386   libxcb1 libxcb1:i386   libxext6 libxext6:i386   libx11-6 libx11-6:i386   libglvnd0 libglvnd0:i386   libgl1 libgl1:i386   libglx0 libglx0:i386   libegl1 libegl1:i386   libgles2 libgles2:i386   libgl1-mesa-glx libgl1-mesa-glx:i386   libgl1-mesa-dri libgl1-mesa-dri:i386 &&   wget -qO - http://dl.winehq.org/wine-builds/winehq.key | apt-key add - &&   echo \"deb https://dl.winehq.org/wine-builds/debian/ bookworm main\" >   /etc/apt/sources.list.d/winehq.list &&   sed -i '/^Types: deb/{:a; N; /\\n$/!ba; s/Suites: \\(.*\\)/Suites: bookworm \\1/}' /etc/apt/sources.list.d/debian.sources &&   apt-get update &&   apt-get -y install --install-recommends   winehq-stable=${WINE_VERSION}   wine-stable=${WINE_VERSION}   wine-stable-amd64=${WINE_VERSION}   wine-stable-i386=${WINE_VERSION} &&   rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
nowave7 commented 5 months ago

I tried to build locally as well, and if I recall correctly, I also got this error message. Will check once I get home just to make sure.

netbrain commented 5 months ago

Tried building from scratch locally and seems to build ok but that is probably because i have an old cache. if i try to build it with github actions i get

The following packages have unmet dependencies:
  libgl1-mesa-dri:i386 : Depends: libllvm17t64:i386 but it is not installable

However, even tho im building it correctly, when i run i get 01f0:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."

So not sure what is going on, and I don't have time right now to look into it any further, so i guess you should simply use VERSION=1.60.0 zwift until this is resolved.

nowave7 commented 5 months ago

Just to confirm what is already known. Building the image locally fails for me as does for @jdohm . Log attached. zwift_image_build.log

EDIT: ~~This is interesting: https://stackoverflow.com/questions/66008106/error-building-docker-image-executor-failed-running-bin-sh-c-apt-get-y-upda Could it be somehow related to the daylight savings? Wrong timestamp somewhere? It certainly fits the timeframe when it started to appear.~~

On a closer look, this looks to be the original issue.

7.470 The following packages have unmet dependencies:
7.518  libgl1-mesa-dri:i386 : Depends: libllvm17t64:i386 but it is not installable
7.526 E: Unable to correct problems, you have held broken packages.
quietvoid commented 5 months ago

It's most likely related to the image installing from Debian unstable sid since #63.
There are definitely conflicting package versions.

It would probably be best to base the image on a rolling release distro or to use the Debian unstable image.

netbrain commented 5 months ago

Can anyone try to build #81?

nowave7 commented 5 months ago

Can anyone try to build #81?

Yes, just tried it. The image seem to build, but it still doesn't seem to work. image Let me know if you need the logs.

netbrain commented 5 months ago

@nowave7 i fear you are running the wrong IMAGE after build_image.sh try running IMAGE=netbrain/zwift ./zwift.sh

nowave7 commented 5 months ago

@netbrain Okay, but with that command, the new images is being pulled. Is that expected? image Nevertheless, the problem remains. EDIT: I may have spoken too soon. The zwift installation seem to still be running.

EDIT2: Still the same in the end. Mono installation missing.

quietvoid commented 5 months ago

You need to click Install when it prompts for Wine mono.

nowave7 commented 5 months ago

@quietvoid Okay, I did that, but the application is not starting. And when I rerun the script, it looks as if thought the mono is still missing, and the application installation starts from scratch.

quietvoid commented 5 months ago

I don't know. You could always rename the image tag in the build-image.sh script, instead of netbrain/zwift. You'd need to adjust the launch script to use the different tag.

nowave7 commented 5 months ago

I took your advice @quietvoid and renamed the image version tag, and it seem to have worked now. Thanks! I believe the correct version to be 1.61.0? image This would then solve the issue, and the PR can be merged to master.

quietvoid commented 5 months ago

Yes 1.61.0 is still the latest (1.62.0 is out but not for everyone yet).

netbrain commented 5 months ago

Good to know, but as @quietvoid pointed out, going back to bookworm might cause issues with graphics drivers for other users. so im trying to upgrade to sid across the board, but seems to be a couple of snags in order to get that working.

Might look into using something else than debian as the base image. getting it to work with alpine with xorg and wayland would probably be the best.

netbrain commented 5 months ago

Actually got zwift to work on alpine now pretty easily in my POC, so think i might swap out debian for alpine as a test to see if this would fare better over time.. :crossed_fingers: , this was also running wine 9.0 which has native experimental support for wayland

jdohm commented 5 months ago

let us know if you need additional testers :)

urge4code commented 5 months ago

Got it working using the image tag. Available for testing too if needed! Thank you for this!

netbrain commented 5 months ago

Weird thing is, i got it working pretty easily on my POC when just hacking away and running everything manually, now when trying to run everything through the automated docker environment. things seems to fail in unexplainable ways :disappointed: .

In any case if people wan't to tag along and maybe learn a thing or two, here is a way you can try to install zwift on your own in an ephemeral environment:

xhost + # if running xorg
docker run --privileged \
  -e DISPLAY=$DISPLAY \
  --device=/dev/dri/card0 \
  --device=/dev/dri/renderD128 \
  -v /tmp/.X11-unix:/tmp/.X11-unix  \
  -it --rm  alpine:edge

Your docker command may vary depending on hardware, if nvidia, would probably suffice with --gpus all for graphics

My example is running alpine:edge image, but you can experiment with others if you like,

Now that you have a running alpine environment running, first experiment should be to see if graphics is working and can be forwarded to host. so add mesa-utils and mesa-drivers.

apk add mesa-utils mesa-dri-gallium
glxgears

you should now see some spinning gears, if not your graphics device is probably not available in the container or you are missing some drivers.

If things are still working you should now be ready to install wine and zwift.

apk add wine wine-dev

You can test that wine is working by issuing the command wine notepad.

next you also need/want winetricks and some other utilities

 apk add wget grep bash gnutls vim samba-winbind-clients
  wget \
  https://raw.githubusercontent.com/Winetricks/winetricks/${WINETRICKS_VERSION}/src/winetricks \
  -O /usr/local/bin/winetricks && \
  chmod +x /usr/local/bin/winetricks

Replace WINETRICKS_VERSION with a suitable version.

next to install zwift you require dotnet48, install by issuing winetricks dotnet48 you can also install silently with -q flag

then finally download zwift wget https://cdn.zwift.com/app/ZwiftSetup.exe and install with wine ZwiftSetup.exe

If all goes well you and everything installs you should then be ready to launch zwift, however this is where some runfromprocess-rs is required. Please refer to the entrypoint.sh on how runfromprocess-rs.exe is run in conjunction with ZwiftLauncher.exe. But in essence runfromprocess is used to simulate that ZwiftApp.exe is being run or forked off a parent process ZwiftLauncher.exe. In order to get a hold of this runfromprocess-rs application you can either compile the source code yourself, or copy it from an existing docker container, the latter probably being the easiest.

Something along the lines of :

docker run -d --entrypoint sleep infinity --name temp netbrain/zwift:xxx
docker cp temp:/usr/bin/runfromprocess-rs.exe ./runfromprocess-rs.exe
docker cp ./runfromprocess-rs.exe <your-alpine-container-id>:/usr/bin/runfromprocess-rs.exe

You should now have your own copy of runfromprocess-rs in the alpine container which you can use to launch zwift.

Also take a look at my zwift.verb file which you can use to install zwift on a more automated way.

winetricks -q dotnet48 ./zwift.verb should do the trick when the environment is up and running.

Ill hopefully soon get around to create a fully automated system, and in any case would be great if you guys would manage to create a reproducible build of zwift using alpine or any other tiny image for that matter.

Let me know how you fare, I've butted against quite a few issues, probably more than described in this post.

netbrain commented 5 months ago

Just got it working again now manually, seems to be some issue creeping up when running things in unattended mode. Not sure why. but i'll look into it more in the next few days, hopefully. :crossed_fingers:

netbrain commented 5 months ago

I've also now rolled back to 1.60.0 being the latest in docker hub and paused zwift update github action as to not create new failing container images.

quietvoid commented 5 months ago

if you guys would manage to create a reproducible build of zwift using alpine or any other tiny image for that matter.

I've mentioned it before but I maintain my own image based on Arch Linux here:

I haven't tried making it compatible with NVIDIA GPUs, so it's only missing that.

The Wayland only version is semi-broken since the Wine Wayland driver is very new. For example it seems automatic window scaling is not supported yet, so there are bugs if the resolution is different in game vs. on the display.

netbrain commented 5 months ago

shameless self-promotion :rofl:

Yeah, archlinux is definitely an option. But i would prefer if we could use alpine or something more lightweight. Not saying that archlinux is wrong in any way, im a fan. But ideally i'd like to have a statically compiled wine binary on a scratch docker container and nothing else. But that's not going to happen in any time soon. So the closest were gonna get right now is something like alpine.

nowave7 commented 5 months ago

Weird thing is, i got it working pretty easily on my POC when just hacking away and running everything manually, now when trying to run everything through the automated docker environment. things seems to fail in unexplainable ways 😞 .

In any case if people wan't to tag along and maybe learn a thing or two, here is a way you can try to install zwift on your own in an ephemeral environment:

xhost + # if running xorg
docker run --privileged \
  -e DISPLAY=$DISPLAY \
  --device=/dev/dri/card0 \
  --device=/dev/dri/renderD128 \
  -v /tmp/.X11-unix:/tmp/.X11-unix  \
  -it --rm  alpine:edge

Your docker command may vary depending on hardware, if nvidia, would probably suffice with --gpus all for graphics

My example is running alpine:edge image, but you can experiment with others if you like,

Now that you have a running alpine environment running, first experiment should be to see if graphics is working and can be forwarded to host. so add mesa-utils and mesa-drivers.

apk add mesa-utils mesa-dri-gallium
glxgears

you should now see some spinning gears, if not your graphics device is probably not available in the container or you are missing some drivers.

If things are still working you should now be ready to install wine and zwift.

apk add wine wine-dev

You can test that wine is working by issuing the command wine notepad.

next you also need/want winetricks and some other utilities

 apk add wget grep bash gnutls vim samba-winbind-clients
  wget \
  https://raw.githubusercontent.com/Winetricks/winetricks/${WINETRICKS_VERSION}/src/winetricks \
  -O /usr/local/bin/winetricks && \
  chmod +x /usr/local/bin/winetricks

Replace WINETRICKS_VERSION with a suitable version.

next to install zwift you require dotnet48, install by issuing winetricks dotnet48 you can also install silently with -q flag

then finally download zwift wget https://cdn.zwift.com/app/ZwiftSetup.exe and install with wine ZwiftSetup.exe

If all goes well you and everything installs you should then be ready to launch zwift, however this is where some runfromprocess-rs is required. Please refer to the entrypoint.sh on how runfromprocess-rs.exe is run in conjunction with ZwiftLauncher.exe. But in essence runfromprocess is used to simulate that ZwiftApp.exe is being run or forked off a parent process ZwiftLauncher.exe. In order to get a hold of this runfromprocess-rs application you can either compile the source code yourself, or copy it from an existing docker container, the latter probably being the easiest.

Something along the lines of :

docker run -d --entrypoint sleep infinity --name temp netbrain/zwift:xxx
docker cp temp:/usr/bin/runfromprocess-rs.exe ./runfromprocess-rs.exe
docker cp ./runfromprocess-rs.exe <your-alpine-container-id>:/usr/bin/runfromprocess-rs.exe

You should now have your own copy of runfromprocess-rs in the alpine container which you can use to launch zwift.

Also take a look at my zwift.verb file which you can use to install zwift on a more automated way.

winetricks -q dotnet48 ./zwift.verb should do the trick when the environment is up and running.

Ill hopefully soon get around to create a fully automated system, and in any case would be great if you guys would manage to create a reproducible build of zwift using alpine or any other tiny image for that matter.

Let me know how you fare, I've butted against quite a few issues, probably more than described in this post.

I guess it's time for me to get intimate with docker... :D Will have some time over the weekend to try this out. Will gladly do the testing as well.

netbrain commented 5 months ago

the latest changes to #81 now works, please give it a go. I have not optimized this, for instance installing webview2 from external url might be unnecessary as zwift seems to provide it's own webview2. But atleast now we have a starting point for optimizing it further.

netbrain commented 5 months ago

using alpine seems to give a good image size reduction on unpacked images

REPOSITORY                                              TAG             IMAGE ID       CREATED          SIZE
netbrain/zwift                                          1.62.0          56b172ec6e04   14 minutes ago   7.49GB
netbrain/zwift                                          1.60.0          60d5ed64a3c7   4 weeks ago      10GB

Will be exciting to see the gzipped down size of the image when uploaded to docker hub :hugs:

nowave7 commented 5 months ago

the latest changes to #81 now works, please give it a go. I have not optimized this, for instance installing webview2 from external url might be unnecessary as zwift seems to provide it's own webview2. But atleast now we have a starting point for optimizing it further.

Building locally as we speak... Image size is not that important atm, at least not for me, but sure, once it's stable, the size can then also be addressed.

netbrain commented 5 months ago

I can confirm that x11/xorg with intel works fine with xwayland, however pure wayland does not (setting DISPLAY=""). Seems to fail on detecting graphics driver. however sound/pulseaudio works. So should be feature wise identical to the debian alternative.

nowave7 commented 5 months ago

Okay, this is weird. On my main Linux machine, I get to a point where it seems to try to connect to the zwift server in order to download the application but cannot:

+ get_current_version
+ '[' -f Zwift_ver_cur_filename.txt ']'
++ cat Zwift_ver_cur_filename.txt
/bin/entrypoint: line 13: warning: command substitution: ignored null byte in input
+ CUR_FILENAME=Zwift_ver_cur.xml
+ grep -q sversion Zwift_ver_cur.xml
+ ZWIFT_VERSION_CURRENT=0.0.0
+ '[' 0.0.0 = 1.62.0 ']'
+ echo 'updating in progress...'
updating in progress...
+ sleep 5

This just keeps going on... Will try on the laptop as well... But all my Linux machines run Mint, not that that should matter, right?

EDIT: This is coming from the laptop, a bit more but still loops at the same spot: Screenshot from 2024-04-05 22-53-58

netbrain commented 5 months ago

It's just downloading Zwift files in the background. Give it some time, it should finish.

You can verify this by tailing the Zwift launcher log file.

nowave7 commented 5 months ago

Oh, okay, I have gotten a little impatient. Will give it another go :)

netbrain commented 5 months ago

docker exec -it zwift tail -F /home/user/.wine/drive_c/users/user/Documents/Zwift/Logs/Launcher_log.txt

Try running the above while updating.

urge4code commented 5 months ago

@netbrain is there any way to message you directly? I've clicked around here on github but can't find anything. Just wanted to say thank you!

Also, did my first zwift tonight with the docker running on Ubuntu at a very nice 4k resolution on the TV in my garage. Fantastic! (please feel free to move this comment or something, I wasn't sure where else to say how great this is working for me)

netbrain commented 5 months ago

@netbrain is there any way to message you directly? I've clicked around here on github but can't find anything. Just wanted to say thank you!

No sorry, not very active on any social media or Im platforms.

However, comments like these that make it all worthwhile, thanks🤗👍

jdohm commented 5 months ago

Can anyone try to build #81?

works fine for me on KDE Plasma using x (building and running it)

OS: Kubuntu 23.10 x86_64 
Kernel: 6.5.0-26-generic 
Uptime: 10 days, 1 hour, 19 mins 
Packages: 3535 (dpkg), 14 (flatpak), 21 (snap) 
Shell: zsh 5.9 
Resolution: 1920x1080, 1920x1080 
DE: Plasma 5.27.8 
WM: KWin 
WM Theme: Breeze 
Theme: [Plasma], Breeze [GTK2/3] 
Icons: [Plasma], breeze-dark [GTK2/3] 
Terminal: konsole 
CPU: Intel i5-6600 (4) @ 3.900GHz 
GPU: Intel HD Graphics 530 
Memory: 7165MiB / 15862MiB 

on wayland (also Plasma) im not able to start, however that could be me just not knowing how to use docker :) (on x i just started the zwift container, i created before, with docker start zwift.