2019-04-01 19:00:57 +00:00
|
|
|
# Dockerfile for building the WASM libraries used by jsfiddle.skia.org and debugger.skia.org
|
2019-10-09 14:46:14 +00:00
|
|
|
FROM gcr.io/skia-public/emsdk-base:prod as builder
|
2018-11-05 22:28:53 +00:00
|
|
|
|
|
|
|
RUN cd /tmp \
|
|
|
|
&& git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' \
|
|
|
|
&& mkdir -p /tmp/skia \
|
|
|
|
&& cd /tmp/skia \
|
|
|
|
&& /tmp/depot_tools/fetch skia
|
|
|
|
|
|
|
|
RUN cd /tmp/skia/skia \
|
|
|
|
&& python tools/git-sync-deps \
|
|
|
|
&& ./bin/fetch-gn
|
|
|
|
|
|
|
|
# PathKit should be in /tmp/skia/skia/out/pathkit/
|
|
|
|
RUN /tmp/skia/skia/modules/pathkit/compile.sh
|
|
|
|
|
|
|
|
# CanvasKit should be in /tmp/skia/skia/out/canvaskit_wasm
|
2019-03-11 20:11:58 +00:00
|
|
|
RUN /tmp/skia/skia/modules/canvaskit/compile.sh
|
2018-11-07 16:32:50 +00:00
|
|
|
|
2019-04-01 19:00:57 +00:00
|
|
|
# Debugger should be in /tmp/skia/skia/out/debugger_wasm
|
|
|
|
RUN /tmp/skia/skia/experimental/wasm-skp-debugger/compile.sh
|
|
|
|
|
2018-11-07 16:32:50 +00:00
|
|
|
RUN cd /tmp/skia/skia && git rev-parse HEAD > /tmp/VERSION
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# Multi-stage build part 2, in which we only have the compiled results and
|
|
|
|
# a VERSION in /tmp
|
|
|
|
# See https://docs.docker.com/develop/develop-images/multistage-build/
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
WORKDIR /tmp/
|
|
|
|
|
|
|
|
RUN mkdir /tmp/pathkit /tmp/canvaskit
|
|
|
|
|
|
|
|
COPY --from=builder /tmp/VERSION /tmp/VERSION
|
|
|
|
|
|
|
|
COPY --from=builder /tmp/skia/skia/out/pathkit/pathkit* /tmp/pathkit/
|
|
|
|
|
|
|
|
COPY --from=builder /tmp/skia/skia/out/canvaskit_wasm/canvaskit* /tmp/canvaskit/
|
2019-04-01 19:00:57 +00:00
|
|
|
|
|
|
|
COPY --from=builder /tmp/skia/skia/out/debugger_wasm/debugger* /tmp/debugger/
|