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