Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 1 | # Docker |
Joe Gregorio | f2dbd75 | 2018-05-15 16:25:54 -0400 | [diff] [blame] | 2 | |
| 3 | Docker files for building different Skia targets. |
Joe Gregorio | ca8b0bd | 2018-05-28 09:19:44 -0400 | [diff] [blame] | 4 | |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 5 | ## skia-release |
Joe Gregorio | ca8b0bd | 2018-05-28 09:19:44 -0400 | [diff] [blame] | 6 | |
Kevin Lubick | fe6b489 | 2018-06-05 17:21:30 -0400 | [diff] [blame] | 7 | This image is used to build Skia at TOT with SwiftShader. |
| 8 | |
Joe Gregorio | ca8b0bd | 2018-05-28 09:19:44 -0400 | [diff] [blame] | 9 | There is a continuous process that builds this docker image, but if you |
| 10 | need 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 |
Kevin Lubick | fe6b489 | 2018-06-05 17:21:30 -0400 | [diff] [blame] | 15 | |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 16 | ## skia-wasm-release |
Kevin Lubick | 9617569 | 2018-11-05 17:28:53 -0500 | [diff] [blame] | 17 | |
| 18 | This image is used to build the Web Assembly (WASM) libraries of Skia |
| 19 | at TOT. |
| 20 | |
| 21 | There is a continuous process that builds this docker image, but if you |
| 22 | need 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 | |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 29 | ## skia-with-swift-shader-base |
Kevin Lubick | fe6b489 | 2018-06-05 17:21:30 -0400 | [diff] [blame] | 30 | |
| 31 | This image is used to build a local checkout of Skia with SwiftShader and run the built |
| 32 | executables without requiring the SwiftShader be installed on the host. |
| 33 | |
| 34 | For example (see build-with-swift-shader-and-run for more info), to reproduce a |
| 35 | fuzzer 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 | |
| 40 | There is a continuous process that builds this docker image (which only really changes |
| 41 | if SwiftShader is updated), but if you need to manually push a version, then run the |
| 42 | following 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 |
Kevin Lubick | 3105238 | 2019-01-31 12:47:20 -0500 | [diff] [blame] | 46 | docker push gcr.io/skia-public/skia-with-swift-shader-base:prod |
| 47 | |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 48 | ## cmake-release |
Kevin Lubick | 3105238 | 2019-01-31 12:47:20 -0500 | [diff] [blame] | 49 | |
| 50 | This image is used to build Skia using CMake. |
| 51 | |
| 52 | It gets manually pushed anytime there's an update to the Dockerfile or relevant |
| 53 | installed libraries. To push: |
| 54 | |
| 55 | docker build -t cmake-release ./cmake-release/ |
Kevin Lubick | 9a2bb09 | 2019-02-01 13:32:44 -0500 | [diff] [blame] | 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 |
Kevin Lubick | 3105238 | 2019-01-31 12:47:20 -0500 | [diff] [blame] | 58 | |
| 59 | For 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 |
Kevin Lubick | 402bf74 | 2019-02-12 08:28:12 -0500 | [diff] [blame] | 67 | |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 68 | ## binary-size |
Kevin Lubick | 402bf74 | 2019-02-12 08:28:12 -0500 | [diff] [blame] | 69 | |
| 70 | This image is used to build code size tree-maps of Skia |
| 71 | |
| 72 | It gets manually pushed anytime there's an update to the Dockerfile or relevant |
| 73 | installed 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 | |
| 79 | For 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 |
Joe Gregorio | 4cb778e | 2019-10-14 14:47:11 -0400 | [diff] [blame] | 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 | |
| 90 | This image contains all the tools needed to build Skia. |
| 91 | |
| 92 | To push a new version run: |
| 93 | |
| 94 | make push-skia-build-tools |