blob: ed6a29050f933de11cac1e6a7d256730a172ba73 [file] [log] [blame]
Rob Mohre916d322020-07-17 09:07:32 -07001------
2docker
3------
Rob Mohr4ba68e22020-08-04 15:19:49 -07004``pw_env_setup`` reliably initializes a working environment for Pigweed, but
5can take awhile to run. It intelligently caches where it can, but that caching
6is designed around a particular execution environment. That environment
7assumption is poor when running tests with docker. To help out teams using
8docker for automated testing, the Pigweed team has a publicly-available docker
9image with a cache of some of the Pigweed environment. The current tag of this
10image is in ``docker/tag`` under the Pigweed checkout.
Rob Mohre916d322020-07-17 09:07:32 -070011
Rob Mohr4ba68e22020-08-04 15:19:49 -070012To build your own docker image, start with ``docker/Dockerfile.cache`` and
13run ``docker build --file docker/Dockerfile.cache .`` from the root of your
14Pigweed checkout.
Rob Mohre916d322020-07-17 09:07:32 -070015
Rob Mohr4ba68e22020-08-04 15:19:49 -070016To use the publicly-available docker image, run
17``docker build --file docker/Dockerfile.run --build-arg from=$(cat docker/tag) .``
18from the root of your Pigweed checkout. You still need to run
19``. ./bootstrap.sh`` within the docker image, but it should complete much
20faster than on a vanilla docker image.
21
22We're still trying to improve this process, so if you have any ideas for
23improvements please `send us a note`_.
24
25.. _send us a note: pigweed@googlegroups.com