From 5ecbaab4d9f5bf0dfc3a41f5fe2e89112e3e605f Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Fri, 12 Jan 2024 09:54:15 -0300 Subject: [PATCH 1/3] fix(cli): Unbox command should run as release --- yarn-project/cli/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/yarn-project/cli/Dockerfile b/yarn-project/cli/Dockerfile index 21dfcc65e976..f2903ab8eda4 100644 --- a/yarn-project/cli/Dockerfile +++ b/yarn-project/cli/Dockerfile @@ -4,6 +4,7 @@ ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/cli/dest/bin/index.j # The version has been updated in yarn-project-prod. # Adding COMMIT_TAG here to rebuild versioned image. ARG COMMIT_TAG="" +ENV COMMIT_TAG=$COMMIT_TAG RUN mkdir /cache && chmod 777 /cache ENV XDG_CACHE_HOME /cache From 0f4ca919552868f9337266ad4e2dfe017a03b03d Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Fri, 12 Jan 2024 10:41:16 -0300 Subject: [PATCH 2/3] Move COMMIT_TAG env var to yarn project prod image --- yarn-project/Dockerfile.prod | 3 ++- yarn-project/cli/Dockerfile | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/Dockerfile.prod b/yarn-project/Dockerfile.prod index 8b76b9c2323f..23c3657cbc2a 100644 --- a/yarn-project/Dockerfile.prod +++ b/yarn-project/Dockerfile.prod @@ -7,7 +7,6 @@ FROM node:18.19.0 AS builder RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* && apt-get clean COPY --from=yarn-project /usr/src /usr/src WORKDIR /usr/src/yarn-project -ARG COMMIT_TAG="" # TODO: Use release-please to update package.json directly, and remove this! RUN ./scripts/version_packages.sh # Productionify. See comment in yarn-project-base/Dockerfile. @@ -28,6 +27,8 @@ RUN rm -rf /usr/src/noir/target # We could also use distroless, to get us about 20mb off, but meh. It's actually useful to shell into containers. #FROM gcr.io/distroless/nodejs18-debian12 FROM ubuntu:lunar +ARG COMMIT_TAG="" +ENV COMMIT_TAG=$COMMIT_TAG # RUN apt update && apt install -y nodejs && rm -rf /var/lib/apt/lists/* && apt-get clean RUN apt update && apt install -y curl && rm -rf /var/lib/apt/lists/* && apt-get clean ENV NODE_VERSION=18.19.0 diff --git a/yarn-project/cli/Dockerfile b/yarn-project/cli/Dockerfile index f2903ab8eda4..21dfcc65e976 100644 --- a/yarn-project/cli/Dockerfile +++ b/yarn-project/cli/Dockerfile @@ -4,7 +4,6 @@ ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/cli/dest/bin/index.j # The version has been updated in yarn-project-prod. # Adding COMMIT_TAG here to rebuild versioned image. ARG COMMIT_TAG="" -ENV COMMIT_TAG=$COMMIT_TAG RUN mkdir /cache && chmod 777 /cache ENV XDG_CACHE_HOME /cache From 50eb39665521f685796645b4c2d3fd557aba2bf7 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Fri, 12 Jan 2024 11:00:05 -0300 Subject: [PATCH 3/3] Do not remove previous commit_tag --- yarn-project/Dockerfile.prod | 1 + 1 file changed, 1 insertion(+) diff --git a/yarn-project/Dockerfile.prod b/yarn-project/Dockerfile.prod index 23c3657cbc2a..8073db145d57 100644 --- a/yarn-project/Dockerfile.prod +++ b/yarn-project/Dockerfile.prod @@ -8,6 +8,7 @@ RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* && apt-get cl COPY --from=yarn-project /usr/src /usr/src WORKDIR /usr/src/yarn-project # TODO: Use release-please to update package.json directly, and remove this! +ARG COMMIT_TAG="" RUN ./scripts/version_packages.sh # Productionify. See comment in yarn-project-base/Dockerfile. RUN yarn workspaces focus @aztec/cli @aztec/aztec-sandbox @aztec/aztec-faucet @aztec/aztec.js --production && \