1cb93a386Sopenharmony_ci# Docker 2cb93a386Sopenharmony_ci 3cb93a386Sopenharmony_ciDocker files for building different Skia targets. 4cb93a386Sopenharmony_ci 5cb93a386Sopenharmony_ci## skia-release 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ciThis image is used to build Skia at TOT with SwiftShader. 8cb93a386Sopenharmony_ci 9cb93a386Sopenharmony_ciThere is a continuous process that builds this docker image, but if you 10cb93a386Sopenharmony_cineed to manually push a verison, then run the following commands: 11cb93a386Sopenharmony_ci 12cb93a386Sopenharmony_ci docker build -t skia-release ./docker/skia-release/ 13cb93a386Sopenharmony_ci docker tag skia-release gcr.io/skia-public/skia-release:prod 14cb93a386Sopenharmony_ci docker push gcr.io/skia-public/skia-release:prod 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_ci## skia-wasm-release 17cb93a386Sopenharmony_ci 18cb93a386Sopenharmony_ciThis image is used to build the Web Assembly (WASM) libraries of Skia 19cb93a386Sopenharmony_ciat TOT. 20cb93a386Sopenharmony_ci 21cb93a386Sopenharmony_ciThere is a continuous process that builds this docker image, but if you 22cb93a386Sopenharmony_cineed to manually push a verison, then run the following commands: 23cb93a386Sopenharmony_ci 24cb93a386Sopenharmony_ci docker build -t skia-wasm-release ./docker/skia-wasm-release/ 25cb93a386Sopenharmony_ci docker tag skia-wasm-release gcr.io/skia-public/skia-wasm-release:prod 26cb93a386Sopenharmony_ci docker push gcr.io/skia-public/skia-wasm-release:prod 27cb93a386Sopenharmony_ci 28cb93a386Sopenharmony_ci 29cb93a386Sopenharmony_ci## skia-with-swift-shader-base 30cb93a386Sopenharmony_ci 31cb93a386Sopenharmony_ciThis image is used to build a local checkout of Skia with SwiftShader and run the built 32cb93a386Sopenharmony_ciexecutables without requiring the SwiftShader be installed on the host. 33cb93a386Sopenharmony_ci 34cb93a386Sopenharmony_ciFor example (see build-with-swift-shader-and-run for more info), to reproduce a 35cb93a386Sopenharmony_cifuzzer bug in SwiftShader: 36cb93a386Sopenharmony_ci 37cb93a386Sopenharmony_ci # First, copy the test case into $SKIA_ROOT, say $SKIA_ROOT/skbug_1234 38cb93a386Sopenharmony_ci build-with-swift-shader-and-run "out/with-swift-shader/fuzz -t filter_fuzz -b /skia/skbug_1234" 39cb93a386Sopenharmony_ci 40cb93a386Sopenharmony_ciThere is a continuous process that builds this docker image (which only really changes 41cb93a386Sopenharmony_ciif SwiftShader is updated), but if you need to manually push a version, then run the 42cb93a386Sopenharmony_cifollowing commands: 43cb93a386Sopenharmony_ci 44cb93a386Sopenharmony_ci docker build -t skia-with-swift-shader-base ./docker/skia-with-swift-shader-base/ 45cb93a386Sopenharmony_ci docker tag skia-with-swift-shader-base gcr.io/skia-public/skia-with-swift-shader-base:prod 46cb93a386Sopenharmony_ci docker push gcr.io/skia-public/skia-with-swift-shader-base:prod 47cb93a386Sopenharmony_ci 48cb93a386Sopenharmony_ci## cmake-release 49cb93a386Sopenharmony_ci 50cb93a386Sopenharmony_ciThis image is used to build Skia using CMake. 51cb93a386Sopenharmony_ci 52cb93a386Sopenharmony_ciIt gets manually pushed anytime there's an update to the Dockerfile or relevant 53cb93a386Sopenharmony_ciinstalled libraries. To push: 54cb93a386Sopenharmony_ci 55cb93a386Sopenharmony_ci docker build -t cmake-release ./cmake-release/ 56cb93a386Sopenharmony_ci docker tag cmake-release gcr.io/skia-public/cmake-release:3.13.1_v2 57cb93a386Sopenharmony_ci docker push gcr.io/skia-public/cmake-release:3.13.1_v2 58cb93a386Sopenharmony_ci 59cb93a386Sopenharmony_ciFor testing the image locally, the following flow can be helpful: 60cb93a386Sopenharmony_ci 61cb93a386Sopenharmony_ci docker build -t cmake-release ./cmake-release/ 62cb93a386Sopenharmony_ci # Run bash in it to poke around and make sure things are properly 63cb93a386Sopenharmony_ci # installed and configured. Also useful to get version of CMake. 64cb93a386Sopenharmony_ci docker run -it cmake-release /bin/bash 65cb93a386Sopenharmony_ci # Compile Skia in a local checkout with the local image 66cb93a386Sopenharmony_ci docker run -v $SKIA_ROOT:/SRC -v /tmp/output:/OUT cmake-release /SRC/infra/docker/cmake/build_skia.sh 67cb93a386Sopenharmony_ci 68cb93a386Sopenharmony_ci## binary-size 69cb93a386Sopenharmony_ci 70cb93a386Sopenharmony_ciThis image is used to build code size tree-maps of Skia 71cb93a386Sopenharmony_ci 72cb93a386Sopenharmony_ciIt gets manually pushed anytime there's an update to the Dockerfile or relevant 73cb93a386Sopenharmony_ciinstalled libraries. To push: 74cb93a386Sopenharmony_ci 75cb93a386Sopenharmony_ci docker build -t binary-size ./binary-size/ 76cb93a386Sopenharmony_ci docker tag binary-size gcr.io/skia-public/binary-size:v1 77cb93a386Sopenharmony_ci docker push gcr.io/skia-public/binary-size:v1 78cb93a386Sopenharmony_ci 79cb93a386Sopenharmony_ciFor testing the image locally, the following flow can be helpful: 80cb93a386Sopenharmony_ci 81cb93a386Sopenharmony_ci docker build -t binary-size ./binary-size/ 82cb93a386Sopenharmony_ci # Run bash in it to poke around and make sure things are properly 83cb93a386Sopenharmony_ci # installed and configured. 84cb93a386Sopenharmony_ci docker run -it binary-size /bin/sh 85cb93a386Sopenharmony_ci # analyze exe "skottie_tool" in build directory out/Release 86cb93a386Sopenharmony_ci docker run -v $SKIA_ROOT/out/Release:/IN -v /tmp/output:/OUT binary-size /opt/binary_size/src/run_binary_size_analysis.py --library /IN/skottie_tool --destdir /OUT 87cb93a386Sopenharmony_ci 88cb93a386Sopenharmony_ci## skia-build-tools 89cb93a386Sopenharmony_ci 90cb93a386Sopenharmony_ciThis image contains all the tools needed to build Skia. 91cb93a386Sopenharmony_ci 92cb93a386Sopenharmony_ciTo push a new version run: 93cb93a386Sopenharmony_ci 94cb93a386Sopenharmony_ci make push-skia-build-tools