Comments (9)
I actually discovered this a few hours ago while trying to fix the android modules. Your regex is much better than what I had though so I went ahead and incorporated it into my branch. Will try to fast track this to a release. Thanks for chasing this down!
from docker.
The fix is live for Unity 6 images. Check to see if dedicated server is working for you now and if it is we can close this issue
from docker.
That's odd I see this in the build log: [Linux Dedicated Server Build Support] installed successfully.
Maybe pull the image locally and manually check the expected files exist for it?
from docker.
Also make sure you're using the updated image version. Not sure if you've pinned it to 3.0.1 or if that's just what was latest when you ran it. It should be 3.1.0 now
from docker.
That did the trick. I didn't see docs on pinning versions. I just noticed in unityci/editor each image has the version in the name.
Is there a string I should use to just pull the latest?
Updated to -3.1.0
# add file level variables
ARG UnityVersion=6000.0.0f1
ARG UnityCiDockerVersion=3.1.0
# build dependencies
...Truncated...
# linux-specific Unity build
FROM --platform=$BUILDPLATFORM unityci/editor:ubuntu-${UnityVersion}-linux-il2cpp-${UnityCiDockerVersion} AS build-unity-linux
WORKDIR "/src"
COPY --from=build-dependencies /src/src/someProject/ .
# Install the Linux Server Build module
RUN echo "Building User Interface for Linux..."
RUN --mount=type=secret,id=UNITY_USERNAME \
--mount=type=secret,id=UNITY_PASSWORD \
--mount=type=secret,id=UNITY_LICENSE \
unity-editor -quit -batchmode -serial $(cat /run/secrets/UNITY_LICENSE) -username $(cat /run/secrets/UNITY_USERNAME) -password $(cat /run/secrets/UNITY_PASSWORD) && \
unity-editor -quit -batchmode -nographics -buildTarget Linux64 -standaloneBuildSubtarget Server -executeMethod Builder.Build -projectPath . && \
unity-editor -quit -batchmode -returnlicense -username $(cat /run/secrets/UNITY_USERNAME) -password $(cat /run/secrets/UNITY_PASSWORD)
RUN echo "Building User Interface for Linux... completed"
# windows-specific Unity build
FROM --platform=$BUILDPLATFORM unityci/editor:ubuntu-${UnityVersion}-windows-mono-3.0.1 AS build-unity-windows
WORKDIR "/src"
RUN echo "Building User Interface for Windows..."
COPY --from=build-dependencies /src/src/someProject/ .
RUN --mount=type=secret,id=UNITY_USERNAME \
--mount=type=secret,id=UNITY_PASSWORD \
--mount=type=secret,id=UNITY_LICENSE \
unity-editor -quit -batchmode -serial $(cat /run/secrets/UNITY_LICENSE) -username $(cat /run/secrets/UNITY_USERNAME) -password $(cat /run/secrets/UNITY_PASSWORD) && \
unity-editor -quit -batchmode -nographics -buildTarget win64 -standaloneBuildSubtarget Server -executeMethod Builder.Build -projectPath . && \
unity-editor -quit -batchmode -returnlicense -username $(cat /run/secrets/UNITY_USERNAME) -password $(cat /run/secrets/UNITY_PASSWORD)# linux-specific base
RUN echo "Building User Interface for Windows... completed"
# platform-dynamic build-unity
FROM build-unity-${TARGETOS} AS build-unity
# linux-specific base
FROM ubuntu:latest AS base-linux
USER $APP_UID
ENTRYPOINT ["./someProject.x86_64"]
# windows-specific base
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 AS base-windows
ENTRYPOINT ["some.exe"]
# platform-dynamic final
FROM base-${TARGETOS} AS final
EXPOSE 7777/udp
WORKDIR /app
COPY --from=build-unity "src/Build/" .
COPY src/someProject/Assets/appsettings.json someProject_Data/
from docker.
Perhaps tied to regex check for version before installing server modules:
RUN echo "$version-$module" | grep -q -vP '^(2021.2.(?![0-4](?![0-9]))|2021.[3-9]|202[2-9]|20[3-9]).*linux' \
&& exit 0 \
|| unity-hub install-modules --version "$version" --module "linux-server" --childModules | tee /var/log/install-module-linux-server.log && grep 'Missing module' /var/log/install-module-linux-server.log | exit $(wc -l);
RUN echo "$version-$module" | grep -q -vP '^(2021.2.(?![0-4](?![0-9]))|2021.[3-9]|202[2-9]|20[3-9]).*windows' \
&& exit 0 \
|| unity-hub install-modules --version "$version" --module "windows-server" --childModules | tee /var/log/install-module-windows-server.log && grep 'Missing module' /var/log/install-module-windows-server.log | exit $(wc -l);
https://github.com/game-ci/docker/blob/main/images/ubuntu/editor/Dockerfile
Something like this would work to cover version 6+ and 10+ assuming this version style is maintained.
Regex addition:
^([6-9][0-9]{3}|[1-9][0-9]{4,}).*
- Any 4-digit version starting from 6000 up to 9999.
- Any 5-digit or larger version number starting from 10000 and upwards
Makes the final pattern a bit gross but likely works, haven't tested yet.
POTENTIAL SOLUTION:
RUN echo "$version-$module" | grep -q -vP '^(2021.2.(?![0-4](?![0-9]))|2021.[3-9]|202[2-9]|20[3-9]|[6-9][0-9]{3}|[1-9][0-9]{4,}).*linux' \
&& exit 0 \
|| unity-hub install-modules --version "$version" --module "linux-server" --childModules | tee /var/log/install-module-linux-server.log && grep 'Missing module' /var/log/install-module-linux-server.log | exit $(wc -l);
RUN echo "$version-$module" | grep -q -vP '^(2021.2.(?![0-4](?![0-9]))|2021.[3-9]|202[2-9]|20[3-9]|[6-9][0-9]{3}|[1-9][0-9]{4,}).*windows' \
&& exit 0 \
|| unity-hub install-modules --version "$version" --module "windows-server" --childModules | tee /var/log/install-module-windows-server.log && grep 'Missing module' /var/log/install-module-windows-server.log | exit $(wc -l);
from docker.
#146 144.2 Asset Pipeline Refresh (id=905952f5a7a50c95394e27c5dcd177f1): Total: 0.022 seconds - Initiated by StopAssetImportingV2(NoUpdateAssetOptions)
#146 144.2 Error building Player: Dedicated Server support for Linux is not installed.
Maybe the image isn't built out yet?
from docker.
That's probably it!
from docker.
If you use just 3 as the version it will be the latest version with a major version of 3
from docker.
Related Issues (20)
- Missing WebGL/Android building docker containers for Windows HOT 2
- Build Failed on unityci/editor:2021.3.22f1-windows-mono-1.1 HOT 1
- Support for Windows Server 2022 HOT 1
- Build fails for editor-ubuntu-2023.1.0f1-webgl-1.1.2 with URP
- Update ubuntu version from 18.04 to 22.04 HOT 3
- Manifest unknown for certain images on unityci/editor but not for others. HOT 2
- Stop supporting EOL versions of Unity Editor
- manifest for unityci/editor:2022.3.8f1-linux-il2cpp-1 not found HOT 1
- manifest for unityci/editor:windows-2021.3.16f1-webgl-2 not found HOT 1
- "Build succeeded" but still getting "There was an error..." HOT 1
- Pass env vars set in workflow file to docker environment HOT 6
- Fail to build containers because of failing git lfs checkout HOT 2
- docker: invalid reference format: repository name must be lowercase. HOT 4
- Unable to Generate Logs and Hanging Execution with unityci/editor Docker Image on Mac with Apple Silicon HOT 1
- xvfb-run is not invoked as root user when using runAsHostUser
- GameCI WebGL builds have no audio. HOT 1
- Licensing issue with non root user
- Intermittent crashes when running unity builds on docker.
- Error when pulling ci editor image for version 2022.3.29.f1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.