Docker image with Unity 3D for use in CI builds that can be run as a non-root user.
9.5K
This docker image was based on GitLab CI with Unity3D in Docker and Unity3d docker image for running commands in CI such as gitlab-ci.
Linux Unity3d builds are taken from Unity on Linux: Release Notes and Known Issues
This docker image runs in a terminal so you don't have access to the UI. This docker image is intended to run unity commands with the command line. You can use it for running tests and creating builds.
UNITY_VERSION=2018.3.0f2
[email protected]
UNITY_PASSWORD=yourPassword
docker run -it --rm \
-e "HOSTUID=`id -u`" \
-e "HOSTGID=`id -g`" \
-e "UNITY_USERNAME=$UNITY_USERNAME" \
-e "UNITY_PASSWORD=$UNITY_PASSWORD" \
-e "WORKDIR=/work" \
-v "$(pwd):/work" \
wtanaka/unity3d:"$UNITY_VERSION" \
bash
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity \
-logFile \
-batchmode \
-username "$UNITY_USERNAME" -password "$UNITY_PASSWORD"
LICENSE SYSTEM [2017723 8:6:38] Posting <?xml version="1.0" encoding="UTF-8"?><root><SystemInfo><IsoCode>en</IsoCode><UserName>[...]
unity3d.alfunity3d.alf for manual activationUnity_v2018.x.ulfUnity_v2018.x.ulf license file to your CI's environment variable UNITY_LICENSE_CONTENT.UNITY_LICENSE_CONTENT="`cat Unity_v2018.x.ulf`"
export UNITY_LICENSE_CONTENT
UNITY_VERSION=2018.3.0f2
export UNITY_VERSION
docker run -it --rm \
-e "HOSTUID=`id -u`" \
-e "HOSTGID=`id -g`" \
-e "TEST_PLATFORM=playmode" \
-e UNITY_LICENSE_CONTENT \
-e "WORKDIR=/work" \
-v "$(pwd):/work" \
wtanaka/unity3d:"$UNITY_VERSION" \
/xvfb_runtests.sh
UNITY_LICENSE_CONTENT="`cat Unity_v2018.x.ulf`"
export UNITY_LICENSE_CONTENT
UNITY_VERSION=2018.3.0f2
export UNITY_VERSION
docker run -it --rm \
-e "HOSTUID=`id -u`" \
-e "HOSTGID=`id -g`" \
-e "TEST_PLATFORM=editmode" \
-e UNITY_LICENSE_CONTENT \
-e "WORKDIR=/work" \
-v "$(pwd):/work" \
wtanaka/unity3d:"$UNITY_VERSION" \
/xvfb_runtests.sh
UNITY_LICENSE_CONTENT="`cat Unity_v2018.x.ulf`"
export UNITY_LICENSE_CONTENT
UNITY_VERSION=2018.3.0f2
export UNITY_VERSION
docker run -it --rm \
-e "HOSTUID=`id -u`" \
-e "HOSTGID=`id -g`" \
-e "TEST_PLATFORM=playmode" \
-e UNITY_LICENSE_CONTENT \
-e "WORKDIR=/work" \
-v "$(pwd):/work" \
wtanaka/unity3d:"$UNITY_VERSION" \
/opt/Unity/Editor/Unity \
-projectPath . \
-quit -batchmode -nographics \
-buildTarget WebGL \
-customBuildTarget WebGL \
-customBuildName TheBuildName \
-customBuildPath TheBuild \
-customBuildOptions AcceptExternalModificationsToPlayer \
-executeMethod BuildCommand.PerformBuild \
-logFile
Content type
Image
Digest
Size
4.5 GB
Last updated
over 7 years ago
docker pull wtanaka/unity3d