blob: eddac2b7d9b9198ddf31ff203257e4d2ed4c8e83 [file] [log] [blame] [view]
Joe Gregorio4cb778e2019-10-14 14:47:11 -04001# Docker
Joe Gregoriof2dbd752018-05-15 16:25:54 -04002
3Docker files for building different Skia targets.
Joe Gregorioca8b0bd2018-05-28 09:19:44 -04004
Joe Gregorio4cb778e2019-10-14 14:47:11 -04005## skia-release
Joe Gregorioca8b0bd2018-05-28 09:19:44 -04006
Kevin Lubickfe6b4892018-06-05 17:21:30 -04007This image is used to build Skia at TOT with SwiftShader.
8
Joe Gregorioca8b0bd2018-05-28 09:19:44 -04009There 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
Kevin Lubickfe6b4892018-06-05 17:21:30 -040015
Joe Gregorio4cb778e2019-10-14 14:47:11 -040016## skia-wasm-release
Kevin Lubick96175692018-11-05 17:28:53 -050017
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
Joe Gregorio4cb778e2019-10-14 14:47:11 -040029## skia-with-swift-shader-base
Kevin Lubickfe6b4892018-06-05 17:21:30 -040030
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
Kevin Lubick31052382019-01-31 12:47:20 -050046 docker push gcr.io/skia-public/skia-with-swift-shader-base:prod
47
Joe Gregorio4cb778e2019-10-14 14:47:11 -040048## cmake-release
Kevin Lubick31052382019-01-31 12:47:20 -050049
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/
Kevin Lubick9a2bb092019-02-01 13:32:44 -050056 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 Lubick31052382019-01-31 12:47:20 -050058
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
Kevin Lubick402bf742019-02-12 08:28:12 -050067
Joe Gregorio4cb778e2019-10-14 14:47:11 -040068## binary-size
Kevin Lubick402bf742019-02-12 08:28:12 -050069
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
Joe Gregorio4cb778e2019-10-14 14:47:11 -040086 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