Editor Lite image
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- docker, unity
- Ambito
- build-system, devops
Direzione di ricerca
Inizia con il Dockerfile incluso nell’issue e confronta il suo builder stage con la definizione attuale dell’immagine Unity Editor. Crea l’immagine ridotta, quindi esegui il workflow di test di Unity per verificare i template, i pacchetti, gli SDK, i file di debugging e i motori di playback rimossi rispetto alle esigenze del progetto. Il lavoro è completato quando l’immagine è più piccola senza interrompere gli scenari CI supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Some time ago I've started to investigate can the image be smaller. I've managed to reduce image size three times (from 3 GB to 1 GB). The reasoning behind my research was that the private GitHub repo has a limited amount of action execution minutes. And seems like downloading the docker image is a significant part of the run tests action. By decreasing the size of the image, we reduced the time of the unity-test-runner from 5.0 mins to 2.3 mins.


But since I'm not interested in fighting around pull requests to this repo and do not have time to test all the limitations & edge cases I want just to share with you the dockerfile to let the community decide is it feasible to take some of my findings and cut them out from the official image.
Dockerfile:
ARG baseImage=unityci/base:latest
ARG editorImage=unityci/editor:2020.2.1f1-base-0
FROM $editorImage as builder
# Templates
RUN echo 'Cleaning image' \
# Remove templates
&& rm -rf /opt/unity/Editor/Data/Resources/PackageManager/ProjectTemplates/ \
&& rm -rf /opt/unity/Editor/Data/Resources/PackageManager/PackageTemplates/ \
# Remove everything except manifest from packages
&& find /opt/unity/Editor/Data/Resources/PackageManager/Editor/ \
! -name 'manifest.json' \
-type f -exec rm -f {} + \
# Remove unnecessary Mono resources
&& rm -rf /opt/unity/Editor/Data/MonoBleedingEdge/lib/mono/monodoc/ \
&& rm -rf /opt/unity/Editor/Data/MonoBleedingEdge/bin-linux32 \
# SDK is not required for .NET Core
&& rm -rf /opt/unity/Editor/Data/NetCore/Sdk-* \
# We are not planning to debug in CI
&& rm -rf /opt/unity/Editor/Unity_s.debug \
# Remove playback engines
&& rm -rf /opt/unity/Editor/Data/PlaybackEngines/
###########################
# Editor #
###########################
FROM $baseImage
# Always put "Editor" and "modules.json" directly in $UNITY_PATH
ARG UNITY_PATH=/opt/unity
COPY --from=builder "$UNITY_PATH/" "$UNITY_PATH/"
# Alias to "unity-editor" with default params
RUN echo '#!/bin/bash\nxvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"' > /usr/bin/unity-editor \
&& chmod +x /usr/bin/unity-editor
- Lingua principale
- Dockerfile
- Stelle
- 471
- Fork
- 141
- Merge medio
- 6g 1h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di game-ci/docker
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Publish Ubuntu 24.04 base, Hub, and Editor imagesForse già presa @CoderGamester l’ha presa 99 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
-
bug windows
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Tutte le issue di game-ci/docker
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AykutSarac/jsoncrack.com#616 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
h5bp/html5-boilerplate#3512 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100