skia2/docker/skia-wasm-release/Dockerfile
Joe Gregorio 4cb778e367 Fix usage of depot_tools in containers.
depot_tools w/vpython now seems to require the depot_tools dir
to be on PATH, and also python and curl need to be installed.

  * Creates a new base image that has all the build tools we need for
building Skia: skia-build-tools.
  * Moves skia-release to use that new base image.
  * Moves both the skia-release and wasm builds to use fetch and gclient sync.
  * Changes gcr.io/skia-public/emsdk-base:prod to depend on skia-build-tools.


Bug: skia:993053
Change-Id: Ib6218d8c18dd59d43de84dcf063f204cfc8556d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248556
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-10-14 19:38:40 +00:00

42 lines
1.3 KiB
Docker

# Dockerfile for building the WASM libraries used by jsfiddle.skia.org and debugger.skia.org
FROM gcr.io/skia-public/emsdk-base:prod as builder
# Checkout Skia.
RUN mkdir -p /tmp/skia \
&& cd /tmp/skia \
&& fetch skia \
&& cd skia \
&& gclient sync \
&& ./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
RUN /tmp/skia/skia/modules/canvaskit/compile.sh
# Debugger should be in /tmp/skia/skia/out/debugger_wasm
RUN /tmp/skia/skia/experimental/wasm-skp-debugger/compile.sh
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/
COPY --from=builder /tmp/skia/skia/out/debugger_wasm/debugger* /tmp/debugger/