Docker#

Pigweed AI summary: The Pigweed team has a Docker image available for teams using Docker for automated testing. The image has a cache of some of the Pigweed environment, which should speed up the process. The team is still working on improving the process and welcomes any ideas for improvements. To build your own Docker image, start with Dockerfile.cache and run "docker build" from the root of your Pigweed checkout. To use the publicly-available Docker image, run "docker build" with the appropriate arguments from the root

pw_env_setup reliably initializes a working environment for Pigweed, but can take awhile to run. It intelligently caches where it can, but that caching is designed around a particular execution environment. That environment assumption is poor when running tests with Docker. To help out teams using Docker for automated testing, the Pigweed team has a publicly-available Docker image with a cache of some of the Pigweed environment. The current tag of this image is in docker/tag under the Pigweed checkout.

We’re still trying to improve this process, so if you have any ideas for improvements please create an issue.

Build your own Docker image#

Pigweed AI summary: This section provides instructions on how to build your own Docker image using the docker/Dockerfile.cache file and running the command "docker build --file docker/Dockerfile.cache ." from the root of your Pigweed checkout.

To build your own Docker image, start with docker/Dockerfile.cache and run docker build --file docker/Dockerfile.cache . from the root of your Pigweed checkout.

Use the publicly available Docker image#

Pigweed AI summary: To use the publicly available Docker image, run the command "docker build --file docker/Dockerfile.run --build-arg from=$(cat docker/tag) ." from the root of your Pigweed checkout. After that, you still need to run ". ./bootstrap.sh" within the Docker image, but it should complete much faster than on a vanilla Docker image.

To use the publicly-available Docker image, run docker build --file docker/Dockerfile.run --build-arg from=$(cat docker/tag) . from the root of your Pigweed checkout. You still need to run . ./bootstrap.sh within the Docker image, but it should complete much faster than on a vanilla Docker image.