Skip to content

Commit

Permalink
chore: Pin node version in docker base images and bump nvmrc (#3537)
Browse files Browse the repository at this point in the history
We were using a floating version of node in our base images, which means
we didn't control when we updated the node version. Also, we were using
an outdated version for local development, which didn't match the one
used for the base images.

This changeset bumps nvmrc to latest node (18.19.0) and pins down the
version of all node base images across dockerfiles in the project.

This PR was triggered by suddenly hitting [this
error](TypeStrong/ts-node#2094) in CI.
  • Loading branch information
spalladino committed Dec 5, 2023
1 parent c800502 commit 5d3895a
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
v18.8.0
v18.19.0
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq coreutils
COPY --from=0 /usr/src/barretenberg/cpp/build /usr/src/barretenberg/cpp/build
COPY --from=noir-acir-tests /usr/src/noir/test_programs /usr/src/noir/test_programs
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.js
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18
FROM node:18.19.0
COPY --from=0 /usr/src/barretenberg/ts /usr/src/barretenberg/ts
COPY --from=noir-acir-tests /usr/src/noir/test_programs /usr/src/noir/test_programs
RUN apt update && apt install -y lsof jq
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.sol
Expand Up @@ -2,7 +2,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clan
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-sol
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq
COPY --from=0 /usr/src/barretenberg/cpp/build /usr/src/barretenberg/cpp/build
COPY --from=1 /usr/src/barretenberg/sol/src/ultra/BaseUltraVerifier.sol /usr/src/barretenberg/sol/src/ultra/BaseUltraVerifier.sol
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/ts/Dockerfile
@@ -1,6 +1,6 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-wasm-linux-clang

FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=0 /usr/src/barretenberg /usr/src/barretenberg

# Create a standalone container that can run bb.js (and tests).
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/Dockerfile
@@ -1,5 +1,5 @@
# Linting requires node.
FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache build-base git python3 curl bash jq
WORKDIR /usr/src/l1-contracts
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/Dockerfile.prod
Expand Up @@ -3,7 +3,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS yarn-project

# Need new arch specific image.
FROM node:18-alpine AS builder
FROM node:18.19.0-alpine AS builder
RUN apk add bash jq --no-cache
COPY --from=yarn-project /usr/src /usr/src
WORKDIR /usr/src/yarn-project
Expand All @@ -18,5 +18,5 @@ RUN yarn workspaces focus @aztec/cli @aztec/aztec-sandbox @aztec/aztec-faucet --
RUN rm -rf /usr/src/noir/target

# Create fresh minimal size image.
FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src /usr/src
4 changes: 2 additions & 2 deletions yarn-project/canary/Dockerfile
@@ -1,4 +1,4 @@
FROM node:18-alpine AS builder
FROM node:18.19.0-alpine AS builder

RUN apk update && apk add --no-cache bash jq curl

Expand All @@ -20,7 +20,7 @@ WORKDIR /usr/src/canary
RUN ./scripts/update_packages.sh canary ../end-to-end/
RUN yarn && yarn build

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache udev ttf-freefont chromium bash
ENV CHROME_BIN="/usr/bin/chromium-browser" PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/canary/Dockerfile.build
Expand Up @@ -3,7 +3,7 @@ WORKDIR /usr/src/yarn-project/canary
# Productionify. See comment in yarn-project-base/Dockerfile.
RUN yarn cache clean && yarn workspaces focus --production

FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src /usr/src
WORKDIR /usr/src/yarn-project/canary
ENTRYPOINT ["yarn", "test"]
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/Dockerfile
Expand Up @@ -10,7 +10,7 @@ RUN yarn workspaces focus --production && yarn cache clean

# Create final, minimal size image.
# TODO: Not very minimal as chromium adds about 500MB of bloat :/ Separate or install at test runtime?
FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache \
jq \
bash \
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/yarn-project-base/Dockerfile
Expand Up @@ -47,7 +47,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js as bb.js
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir as noir
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-packages as noir-packages

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache bash jq curl

# Copy L1 contracts.
Expand Down
2 changes: 1 addition & 1 deletion yellow-paper/Dockerfile
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:18.19.0-alpine
WORKDIR /usr/src
COPY . .
RUN yarn && yarn build --no-minify

0 comments on commit 5d3895a

Please sign in to comment.