Skip to content

Building on self-hosted Windows 11: dockerWorkspacePath doesn't update --workdir #643

Open

Description

@ah1053

Bug description
Running Unity Builder on Windows 11 self-hosted results in this error docker: Error response from daemon: the working directory 'c:/github/workspace' is invalid, it needs to be an absolute path.

Passing in dockerWorkspacePath as prompted doesn't seem to have an effect

Any help is appreciated

How to reproduce

  • Setup a self-hosted runner on Windows 11 and run unity builder with default args but
game-ci/unity-builder@v4
  with:
    targetPlatform: Android
    dockerWorkspacePath: /github/workspace
    unityVersion: auto
    versioning: Semantic
    androidExportType: androidPackage
    androidSymbolType: none
    runAsHostUser: false
    dockerIsolationMode: default
    containerRegistryRepository: unityci/editor
    containerRegistryImageVersion: [3](https://github.com/storyup/healium-xr-oculus-new/actions/runs/8528284125/job/23361561125#step:4:3)
    awsStackName: game-ci
    providerStrategy: local
    kubeVolumeSize: [5](https://github.com/storyup/healium-xr-oculus-new/actions/runs/8528284125/job/23361561125#step:4:5)Gi
    watchToEnd: true
    cacheUnityInstallationOnMac: false
    skipActivation: false
  env:
    UNITY_SERIAL: ***
    UNITY_EMAIL: ***
    UNITY_PASSWORD: ***

Expected behavior

Adding dockerWorkspacePath will override the --workdir however it doesn't

"C:\Program Files\Docker\Docker\resources\bin\docker.exe" run 
--workdir c:/github/workspace --rm 
--env UNITY_EMAIL=*** --env UNITY_PASSWORD=*** 
--env UNITY_SERIAL=*** --env SKIP_ACTIVATION=false --env UNITY_VERSION=2021.3.4f1 --env PROJECT_PATH=. --env BUILD_TARGET=Android --env BUILD_NAME=Android --env BUILD_PATH=build/Android --env BUILD_FILE=Android.apk --env MANUAL_EXIT=false --env ENABLE_GPU=false --env VERSION=3.0.1 --env ANDROID_VERSION_CODE=3000001 --env ANDROID_EXPORT_TYPE=androidPackage --env ANDROID_SYMBOL_TYPE=none --env RUN_AS_HOST_USER=false --env GITHUB_REF=refs/heads/test-action --env GITHUB_SHA=056aca9a99267e9142cd9f59ec0d4fc1a6b6e2e5 --env GITHUB_REPOSITORY=storyup/healium-xr-oculus-new --env GITHUB_ACTOR=ah1053 --env "GITHUB_WORKFLOW=Build project" --env GITHUB_EVENT_NAME=push --env GITHUB_ACTION=__game-ci_unity-builder --env GITHUB_EVENT_PATH=C:\Users\ahmed\actions-runner\_work\_temp\_github_workflow\event.json --env RUNNER_OS=Windows --env RUNNER_TOOL_CACHE=C:\Users\ahmed\actions

Additional details

Activity

  1. canuc commented on May 23, 2024

    @canuc

    I am also running into this, any solutions?

  2. roomyrooms commented on Aug 27, 2024

    @roomyrooms

    can confirm this is happening for me as well, on windows 10
    would love a fix for this as it's currently blocking

    edit: ah, I see the issue, actually. on windows it prepends c: to the front of the dockerWorkspacePath, so it is changing the value of workdir, it's just in our case we're using github/workspace, so it appears to be the same. that being said, it's still giving this error regardless:

    docker: Error response from daemon: the working directory 'c:/github/workspace' is invalid, it needs to be an absolute path.

  3. Mannilie commented on Sep 14, 2024

    @Mannilie

    I'm running into this exact same problem as well and it's stopping me from being able to run on Windows hosts...
    image

    And can also confirm that adding the dockerWorkspacePath doesn't change it at all. Any ideas?

  4. Mannilie commented on Sep 14, 2024

    @Mannilie

    @roomyrooms , the quick and dirty workaround I found was to just downgrade the game-ci/unity-builder@v2 (because v3 still has the same issue) and it works successfully. I know this isn't a good solution but this apparently unblocks me for the time being until it's fixed:
    image

  5. webbertakken commented on Sep 16, 2024

    @webbertakken
    Member

    Thanks for sharing the workaround. Happy to merge a PR if someone has suggested changes.

  6. dri-richard commented on Sep 24, 2024

    @dri-richard

    (EDIT: never mind, I saw the discussion in the PR re. switching to windows containers.)

    @Mannilie I'm running into the same workspace path problem and tried downloading to unity-builder@v2 but get a problem with the docker image not being available:
    docker: Error response from daemon: manifest for unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 not found: manifest unknown: manifest unknown.

    I'm fairly new to game.ci so may be overlooking something obvious - how are you obtaining an image with a '-1' suffix for the v2 builder?

  7. GabLeRoux commented on Sep 24, 2024

    @GabLeRoux
    Member

    Here’s an explanation of the "not found: manifest unknown" error regarding version 2 of game-ci/unity-builder:

    The error:

    docker: Error response from daemon: manifest for unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 not found: manifest unknown: manifest unknown.
    

    occurs because game-ci/unity-builder@2 is outdated and relies on older Docker images, specifically version 1 of the images, which are no longer published for new Unity releases.

    You could use the customimage parameter, but recent images may not be compatible with the older action.

    The correct approach would be to upgrade to the latest version of game-ci/unity-builder, which is version 4. This version uses updated Docker images and addresses many compatibility issues. You can check the latest releases here. Using version 4 ensures that you are using the latest supported Docker images, preventing such errors.

    You can find available Docker images here:

    • unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 🔴 This image is not available.
    • unityci/editor:windows-2022.3.30f1-windows-il2cpp-2 🔴 This image is not available.
    • unityci/editor:windows-2022.3.30f1-windows-il2cpp-3 🟢 This image is available.

    You can find more details about Docker images here and see Docker image releases here.

    Solution

    As mentioned, the solution has been discussed in the related PR. Specifically, this comment addresses the original issue. It might be worth documenting this somewhere for future reference. 🤔

  8. added a commit that references this issue on Oct 27, 2024
  9. megajogos commented on Oct 17, 2025

    @megajogos

    I have the same issue:
    docker: Error response from daemon: the working directory 'c:/github/workspace' is invalid, it needs to be an absolute path

    The maintainers abandoned the PR because a workaround exists by switching Docker Desktop to Windows containers (#668 (comment)).

    But in my case I can't configure my docker this way.

    Someone could please submit a PR where we really can configure this entire path: c:/github/workspace (without auto prefix c:)

    @webbertakken

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsMicrosoft Windows Platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions