• Home
Name Date Size #Lines LOC

..--

gold-lottie-web-puppeteer/12-May-2024-97

lottie-web-puppeteer/12-May-2024-4634

README.mdD12-May-20243.1 KiB6849

lottiecap_gold.shD12-May-20241.5 KiB4315

README.md

1Docker
2======
3
4Docker files to handle Gold + lottie-web integration
5
6
7lottie-web-puppeteer
8--------------------
9
10This image has Google Chrome, [puppeteer](https://github.com/GoogleChrome/puppeteer),
11and a few other tools for automating web-browser tests.
12
13This image is standalone and does not have any extra dependencies that make
14it Skia-exclusive.
15
16It gets manually pushed anytime there's an update to the Dockerfile or relevant
17installed libraries.
18
19    docker build -t lottie-web-puppeteer ./lottie-web-puppeteer/
20    LOTTIE_VERSION="v2"  # use v1, v2, etc for any re-spins of the container.
21    docker tag lottie-web-puppeteer gcr.io/skia-public/lottie-web-puppeteer:$LOTTIE_VERSION
22    docker push gcr.io/skia-public/lottie-web-puppeteer:$LOTTIE_VERSION
23
24Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when
25using the default Docker settings.  To be safe, it is recommended to run the container
26with the flag --shm-size=2gb.
27
28For testing the image locally, the following can be helpful:
29
30    docker build -t lottie-web-puppeteer ./lottie-web-puppeteer/
31    # Run bash in it to poke around and make sure things are properly installed
32    docker run -it --shm-size=2gb lottie-web-puppeteer /bin/bash
33    # Create a screenshot of a single .json file which will be put in
34    # $SKIA_ROOT/tools/lottiecap/docker_strip.png
35    docker run -it -v $SKIA_ROOT:/SRC -v ~/lottie-samples:/LOTTIE_FILES -v $LOTTIE_ROOT/build/player:/LOTTIE_BUILD -w /SRC/tools/lottiecap lottie-web-puppeteer node /SRC/tools/lottiecap/lottiecap.js --input /LOTTIE_FILES/body_movin.json --lottie_player /LOTTIE_BUILD/lottie.min.js --in_docker --output docker_strip.png
36
37gold-lottie-web-puppeteer
38-------------------------
39
40This image has Google Chrome, [puppeteer](https://github.com/GoogleChrome/puppeteer),
41and a few other tools for automating web-browser tests.
42
43This image assumes the runner wants to collect the output images and JSON data
44specific to Skia Infra's Gold tool (image correctness).
45
46It gets manually pushed anytime there's an update to the Dockerfile or relevant
47installed libraries.
48
49    # Run the following from $SKIA_ROOT/infra/pathkit
50    make gold-docker-image
51    LOTTIE_VERSION="v2"  # use v1, v2, etc for any re-spins of the container.
52    docker tag gold-lottie-web-puppeteer gcr.io/skia-public/gold-lottie-web-puppeteer:$LOTTIE_VERSION
53    docker push gcr.io/skia-public/gold-lottie-web-puppeteer:$LOTTIE_VERSION
54
55
56Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when
57using the default Docker settings.  To be safe, it is recommended to run the container
58with the flag --shm-size=2gb.
59
60For testing the image locally, the following can be helpful:
61
62    # Run the following from $SKIA_ROOT/infra/pathkit
63    make gold-docker-image
64    docker run -it --shm-size=2gb gold-lottie-web-puppeteer /bin/bash
65    # Collect the gold output with the local source repo and *all* of the files
66    # from lottie-samples
67    mkdir -p -m 0777 /tmp/dockerout
68    docker run -v ~/lottie-samples:/LOTTIE_FILES -v $SKIA_ROOT:/SRC -v $LOTTIE_ROOT/build/player:/LOTTIE_BUILD -v /tmp/dockerout:/OUT gold-lottie-web-puppeteer /SRC/infra/lottiecap/docker/lottiecap_gold.sh