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