From 220b575caca13bb26132846b577f142b69ed690e Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Tue, 26 Sep 2023 22:15:16 +0100 Subject: [PATCH] chore: Disable pushing/pulling for layer caching in build. (#2517) * There is little gain to pushing and pulling previously built images to leverage the layer cache, so don't. * If we want to avoid reinstalling compilers etc we should create better base images (later) * Docs doesn't need to build yarn-project anymore as base image already builds it. * Use query_manifest dependencies to determine dependents to pull and tag, rather than sedding Dockerfile. --------- Co-authored-by: ludamad --- Dockerfile | 4 +--- Dockerfile.dockerignore | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.dockerignore diff --git a/Dockerfile b/Dockerfile index 9653ac4..847379f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ -FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS builder +FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project WORKDIR /usr/src COPY . . -WORKDIR /usr/src/yarn-project -RUN yarn build WORKDIR /usr/src/docs RUN yarn && yarn build \ No newline at end of file diff --git a/Dockerfile.dockerignore b/Dockerfile.dockerignore new file mode 100644 index 0000000..224a414 --- /dev/null +++ b/Dockerfile.dockerignore @@ -0,0 +1,10 @@ +# The build context for docs is the root of the repository. +# Be very specific about what we include. +* + +!docs +!l1-contracts/src +!l1-contracts/test +!barretenberg/cpp/src/barretenberg +!circuits/cpp/src +!.release-please-manifest.json \ No newline at end of file