{"id":16781922,"url":"https://github.com/wtanaka/docker-unity3d","last_synced_at":"2025-04-10T21:22:17.450Z","repository":{"id":66620563,"uuid":"156766142","full_name":"wtanaka/docker-unity3d","owner":"wtanaka","description":"Run Unity 3D unit test code headless inside of Docker","archived":false,"fork":false,"pushed_at":"2019-01-19T03:53:49.000Z","size":285,"stargazers_count":26,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T18:52:26.898Z","etag":null,"topics":["docker-image","linux","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wtanaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T20:41:37.000Z","updated_at":"2024-11-21T11:00:00.000Z","dependencies_parsed_at":"2023-05-24T17:45:10.268Z","dependency_job_id":null,"html_url":"https://github.com/wtanaka/docker-unity3d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtanaka%2Fdocker-unity3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtanaka%2Fdocker-unity3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtanaka%2Fdocker-unity3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtanaka%2Fdocker-unity3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtanaka","download_url":"https://codeload.github.com/wtanaka/docker-unity3d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299026,"owners_count":21080449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","linux","unity","unity3d"],"created_at":"2024-10-13T07:44:02.443Z","updated_at":"2025-04-10T21:22:17.436Z","avatar_url":"https://github.com/wtanaka.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity3d docker image\n\n[![Docker Stars](https://img.shields.io/docker/stars/wtanaka/unity3d.svg)](https://hub.docker.com/r/wtanaka/unity3d/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/wtanaka/unity3d.svg)](https://hub.docker.com/r/wtanaka/unity3d/)\n[![Docker Automated build](https://img.shields.io/docker/automated/wtanaka/unity3d.svg)](https://hub.docker.com/r/wtanaka/unity3d/)\n[![Image](https://images.microbadger.com/badges/image/wtanaka/unity3d.svg)](https://microbadger.com/images/wtanaka/unity3d)\n[![Version](https://images.microbadger.com/badges/version/wtanaka/unity3d.svg)](https://microbadger.com/images/wtanaka/unity3d)\n\n## About this image\n\nThis docker image was based on [GitLab CI with Unity3D in\nDocker](https://www.projects.science.uu.nl/DGKVj16/blog/gitlab-ci-with-unity3d-in-docker/)\nand [Unity3d docker image for running commands in CI such as\ngitlab-ci](https://gitlab.com/gableroux/unity3d).\n\nLinux Unity3d builds are taken from [Unity on Linux: Release Notes and\nKnown\nIssues](https://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/)\n\n## Things to consider\n\nThis docker image runs in a terminal so you don't have access to the\nUI. This docker image is intended to run unity commands with the\n**command line**. You can use it for running **tests** and **creating\nbuilds**.\n\n## Usage\n\n### Activate\n\n1. Pull the docker image and run it\n\n```bash\nUNITY_VERSION=2018.3.0f2\nUNITY_USERNAME=your_username@example.com\nUNITY_PASSWORD=yourPassword\ndocker run -it --rm \\\n  -e \"HOSTUID=`id -u`\" \\\n  -e \"HOSTGID=`id -g`\" \\\n  -e \"UNITY_USERNAME=$UNITY_USERNAME\" \\\n  -e \"UNITY_PASSWORD=$UNITY_PASSWORD\" \\\n  -e \"WORKDIR=/work\" \\\n  -v \"$(pwd):/work\" \\\n  wtanaka/unity3d:\"$UNITY_VERSION\" \\\n  bash\n```\n\n2. Run this to try to activate Unity\n\n```bash\nxvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \\\n/opt/Unity/Editor/Unity \\\n-logFile \\\n-batchmode \\\n-username \"$UNITY_USERNAME\" -password \"$UNITY_PASSWORD\"\n```\n\n3. Wait for output that looks like this:\n\n```\nLICENSE SYSTEM [2017723 8:6:38] Posting \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\u003croot\u003e\u003cSystemInfo\u003e\u003cIsoCode\u003een\u003c/IsoCode\u003e\u003cUserName\u003e[...]\n```\n\n4. Copy xml content and save as `unity3d.alf`\n5. Open https://license.unity3d.com/manual and answer questions\n6. Upload `unity3d.alf` for manual activation\n7. Download `Unity_v2018.x.ulf`\n8. Copy the content of `Unity_v2018.x.ulf` license file to your CI's environment variable `UNITY_LICENSE_CONTENT`.\n\n### Running play mode tests\n\n```\nUNITY_LICENSE_CONTENT=\"`cat Unity_v2018.x.ulf`\"\nexport UNITY_LICENSE_CONTENT\nUNITY_VERSION=2018.3.0f2\nexport UNITY_VERSION\ndocker run -it --rm \\\n  -e \"HOSTUID=`id -u`\" \\\n  -e \"HOSTGID=`id -g`\" \\\n  -e \"TEST_PLATFORM=playmode\" \\\n  -e UNITY_LICENSE_CONTENT \\\n  -e \"WORKDIR=/work\" \\\n  -v \"$(pwd):/work\" \\\n  wtanaka/unity3d:\"$UNITY_VERSION\" \\\n  /xvfb_runtests.sh\n```\n\n### Running edit mode tests\n\n```\nUNITY_LICENSE_CONTENT=\"`cat Unity_v2018.x.ulf`\"\nexport UNITY_LICENSE_CONTENT\nUNITY_VERSION=2018.3.0f2\nexport UNITY_VERSION\ndocker run -it --rm \\\n  -e \"HOSTUID=`id -u`\" \\\n  -e \"HOSTGID=`id -g`\" \\\n  -e \"TEST_PLATFORM=editmode\" \\\n  -e UNITY_LICENSE_CONTENT \\\n  -e \"WORKDIR=/work\" \\\n  -v \"$(pwd):/work\" \\\n  wtanaka/unity3d:\"$UNITY_VERSION\" \\\n  /xvfb_runtests.sh\n```\n\n### Building\n\n```\nUNITY_LICENSE_CONTENT=\"`cat Unity_v2018.x.ulf`\"\nexport UNITY_LICENSE_CONTENT\nUNITY_VERSION=2018.3.0f2\nexport UNITY_VERSION\ndocker run -it --rm \\\n  -e \"HOSTUID=`id -u`\" \\\n  -e \"HOSTGID=`id -g`\" \\\n  -e \"TEST_PLATFORM=playmode\" \\\n  -e UNITY_LICENSE_CONTENT \\\n  -e \"WORKDIR=/work\" \\\n  -v \"$(pwd):/work\" \\\n  wtanaka/unity3d:\"$UNITY_VERSION\" \\\n  /opt/Unity/Editor/Unity \\\n  -projectPath . \\\n  -quit -batchmode -nographics \\\n  -buildTarget WebGL \\\n  -customBuildTarget WebGL \\\n  -customBuildName TheBuildName \\\n  -customBuildPath TheBuild \\\n  -customBuildOptions AcceptExternalModificationsToPlayer \\\n  -executeMethod BuildCommand.PerformBuild \\\n  -logFile\n```\n\n## License\n\n[MIT](LICENSE.md) © [Gabriel Le Breton](https://gableroux.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtanaka%2Fdocker-unity3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtanaka%2Fdocker-unity3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtanaka%2Fdocker-unity3d/lists"}