xref: /aosp_15_r20/external/skia/docker/binary-size/Dockerfile (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker# Dockerfile that bundles chromium's binary_size tools
2*c8dee2aaSAndroid Build Coastguard Worker# to build treemaps of code size for executables.
3*c8dee2aaSAndroid Build Coastguard WorkerFROM alpine:latest as dart-sdk-checkout
4*c8dee2aaSAndroid Build Coastguard Worker
5*c8dee2aaSAndroid Build Coastguard WorkerRUN apk update && apk upgrade && \
6*c8dee2aaSAndroid Build Coastguard Worker    apk add git
7*c8dee2aaSAndroid Build Coastguard Worker
8*c8dee2aaSAndroid Build Coastguard WorkerWORKDIR /tmp/
9*c8dee2aaSAndroid Build Coastguard Worker
10*c8dee2aaSAndroid Build Coastguard WorkerRUN git clone --depth 1 https://github.com/dart-lang/sdk.git
11*c8dee2aaSAndroid Build Coastguard Worker
12*c8dee2aaSAndroid Build Coastguard Worker#############################################################################
13*c8dee2aaSAndroid Build Coastguard Worker# Multi-stage build part 2, in which we only have the python runtime and
14*c8dee2aaSAndroid Build Coastguard Worker# and the scripts we need to analyze the binary.
15*c8dee2aaSAndroid Build Coastguard Worker#############################################################################
16*c8dee2aaSAndroid Build Coastguard Worker
17*c8dee2aaSAndroid Build Coastguard WorkerFROM alpine:latest as analyzer
18*c8dee2aaSAndroid Build Coastguard Worker
19*c8dee2aaSAndroid Build Coastguard WorkerRUN apk update && apk upgrade && \
20*c8dee2aaSAndroid Build Coastguard Worker    apk add python binutils
21*c8dee2aaSAndroid Build Coastguard Worker
22*c8dee2aaSAndroid Build Coastguard WorkerWORKDIR /opt
23*c8dee2aaSAndroid Build Coastguard Worker
24*c8dee2aaSAndroid Build Coastguard WorkerCOPY --from=dart-sdk-checkout /tmp/sdk/runtime/third_party/ /opt/
25